Fix issue "CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.".
* add utf8cpp git submodule
More standard. Allows using the system provided utf8cpp.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
* cmake: use standard find_package for zlib
Simpler.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---------
Signed-off-by: Rosen Penev <rosenp@gmail.com>
* remove defaulted constructor
It gets implicitly generated.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
* default some more
swap is not needed here as shared_ptr is copyable.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---------
Signed-off-by: Rosen Penev <rosenp@gmail.com>
* unused includes
Signed-off-by: Rosen Penev <rosenp@gmail.com>
* Use consistent order of includes
Always include in the following order:
- Own header files
- Standard header files
- System header files
- Project header files (toolkit first)
Exceptions:
- cppunit/extensions/HelperMacros.h must be included after
header files declaring stream operators
- config.h must be included before its definitions are used
---------
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Co-authored-by: Urs Fleisch <ufleisch@users.sourceforge.net>
* manual range loop conversions
Signed-off-by: Rosen Penev <rosenp@gmail.com>
* Restore const containers where non const temporaries are iterated
* Use std::as_const() instead of const container copies where possible
---------
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Co-authored-by: Urs Fleisch <ufleisch@users.sourceforge.net>
* clang-tidy: make deleted members public
One oversight of modernize-use-equals-delete is that the C++11 way of
doing this is to make it public, which makes the warning still trigger.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
* clang-tidy: add missing deleted functions
Found with cppcoreguidelines-special-member-functions
Signed-off-by: Rosen Penev <rosenp@gmail.com>
* unique_ptr conversions
unique_ptr is a safer and cleaner way to handle d pointers.
Also added missing = default.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---------
Signed-off-by: Rosen Penev <rosenp@gmail.com>
* clang-tidy: replace RefCounter with shared_ptr
The latter is C++11.
Found with clang-analyzer-webkit.NoUncountedMemberChecker
Signed-off-by: Rosen Penev <rosenp@gmail.com>
* remove trefcounter
It is now unused.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---------
Signed-off-by: Rosen Penev <rosenp@gmail.com>
This ensures that d-pointers exist where they're expected, and that
classes are virtual that we expect to be virtual, as well as ensuring
that we get a failure if the class size changes when it shouldn't.
This also fixes the issues that were discovered by adding these tests.
This one's been haunting me for a couple decades. "Make all the things
virtual!" was kind of a strategy I had for forward compatibility when I
wrote this code when I was 20 or so and didn't know better.