Skip to content

Conversation

Dimi1010
Copy link
Collaborator

  • Changes the if-else chain into a switch case for better readability.
  • Removes the duplicated new PayloadLayer(...) calls. If all validations for a link layer fail, it exits the case statement and the payload layer is created by the tail call. IMO, that is easier to read than the multiline ternary operator + static casts calls.

Copy link

codecov bot commented Sep 30, 2025

Codecov Report

❌ Patch coverage is 67.74194% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.46%. Comparing base (09d2ca5) to head (82bc23a).

Files with missing lines Patch % Lines
Packet++/src/Packet.cpp 67.74% 9 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1981      +/-   ##
==========================================
+ Coverage   83.45%   83.46%   +0.01%     
==========================================
  Files         311      311              
  Lines       54923    54904      -19     
  Branches    11844    11818      -26     
==========================================
- Hits        45837    45827      -10     
+ Misses       7848     7836      -12     
- Partials     1238     1241       +3     
Flag Coverage Δ
alpine320 76.00% <84.21%> (+0.01%) ⬆️
fedora42 75.94% <84.21%> (+0.01%) ⬆️
macos-13 81.61% <36.00%> (-0.02%) ⬇️
macos-14 81.61% <36.00%> (-0.02%) ⬇️
macos-15 81.62% <36.00%> (-0.02%) ⬇️
mingw32 70.75% <73.68%> (+0.04%) ⬆️
mingw64 70.73% <73.68%> (+0.16%) ⬆️
npcap ?
rhel94 75.97% <84.21%> (+0.01%) ⬆️
ubuntu2004 60.24% <84.21%> (+0.01%) ⬆️
ubuntu2004-zstd 60.33% <84.21%> (+0.02%) ⬆️
ubuntu2204 75.91% <84.21%> (+0.01%) ⬆️
ubuntu2204-icpx 60.63% <0.00%> (-0.06%) ⬇️
ubuntu2404 76.00% <84.21%> (+0.01%) ⬆️
ubuntu2404-arm64 75.66% <84.21%> (-0.01%) ⬇️
unittest 83.46% <67.74%> (+0.01%) ⬆️
windows-2022 85.50% <68.18%> (+0.16%) ⬆️
windows-2025 85.53% <68.18%> (+0.13%) ⬆️
winpcap 85.53% <68.18%> (-0.07%) ⬇️
xdp 53.63% <47.36%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Dimi1010 Dimi1010 marked this pull request as ready for review October 1, 2025 06:14
@Dimi1010 Dimi1010 requested a review from seladb as a code owner October 1, 2025 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant