Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaced some C-style casts with Cpp style casts. #1383

Merged
merged 11 commits into from
May 6, 2024

Conversation

Dimi1010
Copy link
Collaborator

@Dimi1010 Dimi1010 commented May 4, 2024

Part of #977.

Overview:

  • Replaces C-style casts to static_cast where possible.
  • Replaces C-style casts to reinterpret_cast where static_cast fails.
  • Single instance of a C-style cast being replaced with const_cast as it was used to strip const-ness.
    Added TODO comment as that is a potential access violation. Link

@Dimi1010 Dimi1010 requested a review from seladb as a code owner May 4, 2024 16:16
Copy link
Collaborator

@tigercosmos tigercosmos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, thanks!

Tests/Pcap++Test/Tests/LiveDeviceTests.cpp Outdated Show resolved Hide resolved
Tests/Pcap++Test/Tests/LiveDeviceTests.cpp Outdated Show resolved Hide resolved
@seladb seladb merged commit 8828cfb into seladb:dev May 6, 2024
39 checks passed
@Dimi1010 Dimi1010 deleted the refactor/cpp11-cast-modernization branch May 6, 2024 11: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.

3 participants