Skip to content

Conversation

@simogasp
Copy link

@simogasp simogasp commented Oct 9, 2025

Hi, this PR cleans up a little bit the code with minor changes:

  • constness for variables, function arguments, and methods
  • avoid c-style casting but rather use static or reinterpret cast
  • use range loops where possible
  • remove virtualfrom overridden methods as it is not necessary
  • use default for empty constructors/destructors
  • use make_unique() instead of allocating explicitly with new
  • define an implicit namespace detail instead of an anonymous namespace
  • use empty() instead of checking size() == 0 for containers

I also had to raise the minimum CMake version because on recent versions the minimum that was required is not supported anymore.

I have some other code improvements requiring C++20 standard (concepts, ranges algo etc), if you are interested I can make another PR after this.
Also the CMakeLists for testing can be simplified quite a bit using fetch_content to retrieve the GTest automatically. I can make a PR about that too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant