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 72.22222% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.42%. Comparing base (eb6f909) to head (5c6d14d).
⚠️ Report is 1 commits behind head on dev.

Files with missing lines Patch % Lines
Packet++/src/Packet.cpp 68.75% 9 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1981      +/-   ##
==========================================
+ Coverage   83.41%   83.42%   +0.01%     
==========================================
  Files         311      311              
  Lines       55002    54984      -18     
  Branches    11764    11752      -12     
==========================================
- Hits        45880    45873       -7     
- Misses       7842     7858      +16     
+ Partials     1280     1253      -27     
Flag Coverage Δ
alpine320 75.92% <71.42%> (+0.01%) ⬆️
fedora42 75.85% <71.42%> (+<0.01%) ⬆️
macos-14 81.55% <31.03%> (-0.02%) ⬇️
macos-15 81.56% <31.03%> (-0.03%) ⬇️
mingw32 70.64% <65.00%> (+0.03%) ⬆️
mingw64 70.62% <65.00%> (+0.17%) ⬆️
npcap ?
rhel94 75.89% <71.42%> (+<0.01%) ⬆️
ubuntu2004 60.17% <66.66%> (-0.01%) ⬇️
ubuntu2004-zstd 60.27% <66.66%> (+0.01%) ⬆️
ubuntu2204 75.84% <71.42%> (+<0.01%) ⬆️
ubuntu2204-icpx 60.61% <3.44%> (-0.02%) ⬇️
ubuntu2404 75.93% <71.42%> (+0.01%) ⬆️
ubuntu2404-arm64 75.58% <71.42%> (-0.02%) ⬇️
unittest 83.42% <72.22%> (+0.01%) ⬆️
windows-2022 85.46% <74.07%> (+0.19%) ⬆️
windows-2025 85.49% <74.07%> (+0.14%) ⬆️
winpcap 85.49% <74.07%> (-0.06%) ⬇️
xdp 53.56% <42.85%> (+<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
@Dimi1010 Dimi1010 merged commit 722ace3 into seladb:dev Oct 10, 2025
40 checks passed
@Dimi1010 Dimi1010 deleted the refactor/create-first-layer-cleanup branch October 10, 2025 21:08
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.

2 participants