mirror of
https://github.com/taglib/taglib.git
synced 2026-08-14 06:17:00 -04:00
Use unique_ptr for d-pointers (#1095)
* 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 <[email protected]> * clang-tidy: add missing deleted functions Found with cppcoreguidelines-special-member-functions Signed-off-by: Rosen Penev <[email protected]> * unique_ptr conversions unique_ptr is a safer and cleaner way to handle d pointers. Also added missing = default. Signed-off-by: Rosen Penev <[email protected]> --------- Signed-off-by: Rosen Penev <[email protected]>
This commit is contained in:
+4
-4
@@ -52,6 +52,9 @@ namespace TagLib {
|
||||
*/
|
||||
virtual ~Tag();
|
||||
|
||||
Tag(const Tag &) = delete;
|
||||
Tag &operator=(const Tag &) = delete;
|
||||
|
||||
/*!
|
||||
* Exports the tags of the file as dictionary mapping (human readable) tag
|
||||
* names (Strings) to StringLists of tag values.
|
||||
@@ -187,11 +190,8 @@ namespace TagLib {
|
||||
Tag();
|
||||
|
||||
private:
|
||||
Tag(const Tag &) = delete;
|
||||
Tag &operator=(const Tag &) = delete;
|
||||
|
||||
class TagPrivate;
|
||||
TagPrivate *d;
|
||||
std::unique_ptr<TagPrivate> d;
|
||||
};
|
||||
} // namespace TagLib
|
||||
|
||||
|
||||
Reference in New Issue
Block a user