* 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.
If only a constant iterator is needed, make the container const if
possible, otherwise use cbegin() and cend() to get a constant iterator
without detaching the container.
These fixes are needed so that `auto` can deduce the correct
iterator type.
Support properties in C bindings
---------
Co-authored-by: whatdoineed2do/Ray <whatdoineed2do@nospam.gmail.com>
Co-authored-by: Urs Fleisch <ufleisch@users.sourceforge.net>
Backport of 4dcf0b41c6b01f45e141https://github.com/taglib/taglib/pull/77
Tested with files larger than 2GB which have been created using
sox -n -r 44100 -C 320 large.mp3 synth 58916 sine 440 channels 2
sox -n -r 44100 -C 0 large.flac synth 25459 sine 440 channels 2
sox -n -r 44100 -C 10 large.ogg synth 229806 sine 440 channels 2
sox -n -r 44100 large.wav synth 6692 sine 440 channels 2
ffmpeg -f lavfi -i "sine=frequency=440:duration=244676" -y large.m4a
The only file which was readable with the tagreader example
before this commit was large.ogg. The problem is that long on
Windows is only 32-bit (also in LLP64 data model of 64-bit
compilation target) and all the file offsets using long are
too small for large files. Now long is replaced by offset_t
(defined to be long long on Windows and off_t on UNIX) for such
cases and some unsigned long are now size_t, which has the
correct size even on Windows.