* 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.
Change the ID3v2 frame factory so it is possible to subclass it for
implementing own frames. Additionally it splits up the createFrame()
method to make its usage in subclasses a bit more easy.