From fa234fc0532a74bd4e0d6e5683dfdadb2262d191 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Thu, 10 Aug 2023 09:53:31 -0700 Subject: [PATCH] make swap function noexcept Signed-off-by: Rosen Penev --- taglib/ape/apeitem.cpp | 2 +- taglib/ape/apeitem.h | 2 +- taglib/asf/asfattribute.cpp | 2 +- taglib/asf/asfattribute.h | 2 +- taglib/asf/asfpicture.cpp | 2 +- taglib/asf/asfpicture.h | 2 +- taglib/fileref.cpp | 2 +- taglib/fileref.h | 2 +- taglib/mp4/mp4coverart.cpp | 2 +- taglib/mp4/mp4coverart.h | 2 +- taglib/mp4/mp4item.cpp | 2 +- taglib/mp4/mp4item.h | 2 +- taglib/toolkit/tbytevector.cpp | 2 +- taglib/toolkit/tbytevector.h | 2 +- taglib/toolkit/tlist.h | 2 +- taglib/toolkit/tlist.tcc | 2 +- taglib/toolkit/tmap.h | 2 +- taglib/toolkit/tmap.tcc | 2 +- taglib/toolkit/tstring.cpp | 2 +- taglib/toolkit/tstring.h | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/taglib/ape/apeitem.cpp b/taglib/ape/apeitem.cpp index 3bf90ff9..08d3b253 100644 --- a/taglib/ape/apeitem.cpp +++ b/taglib/ape/apeitem.cpp @@ -85,7 +85,7 @@ Item &APE::Item::operator=(const Item &item) return *this; } -void APE::Item::swap(Item &item) +void APE::Item::swap(Item &item) noexcept { using std::swap; diff --git a/taglib/ape/apeitem.h b/taglib/ape/apeitem.h index 094e3fa4..c672f653 100644 --- a/taglib/ape/apeitem.h +++ b/taglib/ape/apeitem.h @@ -85,7 +85,7 @@ namespace TagLib { /*! * Exchanges the content of this item by the content of \a item. */ - void swap(Item &item); + void swap(Item &item) noexcept; /*! * Returns the key. diff --git a/taglib/asf/asfattribute.cpp b/taglib/asf/asfattribute.cpp index e5b62ab0..75206452 100644 --- a/taglib/asf/asfattribute.cpp +++ b/taglib/asf/asfattribute.cpp @@ -111,7 +111,7 @@ ASF::Attribute::Attribute(bool value) : ASF::Attribute &ASF::Attribute::operator=(const ASF::Attribute &) = default; -void ASF::Attribute::swap(Attribute &other) +void ASF::Attribute::swap(Attribute &other) noexcept { using std::swap; diff --git a/taglib/asf/asfattribute.h b/taglib/asf/asfattribute.h index 0b7f2cd6..5046065a 100644 --- a/taglib/asf/asfattribute.h +++ b/taglib/asf/asfattribute.h @@ -116,7 +116,7 @@ namespace TagLib /*! * Exchanges the content of the Attribute by the content of \a other. */ - void swap(Attribute &other); + void swap(Attribute &other) noexcept; /*! * Destroys the attribute. diff --git a/taglib/asf/asfpicture.cpp b/taglib/asf/asfpicture.cpp index 64e52baa..17023e7c 100644 --- a/taglib/asf/asfpicture.cpp +++ b/taglib/asf/asfpicture.cpp @@ -107,7 +107,7 @@ int ASF::Picture::dataSize() const ASF::Picture &ASF::Picture::operator=(const ASF::Picture &) = default; -void ASF::Picture::swap(Picture &other) +void ASF::Picture::swap(Picture &other) noexcept { using std::swap; diff --git a/taglib/asf/asfpicture.h b/taglib/asf/asfpicture.h index bb0bd6c7..1102458a 100644 --- a/taglib/asf/asfpicture.h +++ b/taglib/asf/asfpicture.h @@ -78,7 +78,7 @@ namespace TagLib /*! * Exchanges the content of the Picture by the content of \a other. */ - void swap(Picture &other); + void swap(Picture &other) noexcept; /*! * Returns true if Picture stores valid picture diff --git a/taglib/fileref.cpp b/taglib/fileref.cpp index 45b596ef..3da14d87 100644 --- a/taglib/fileref.cpp +++ b/taglib/fileref.cpp @@ -448,7 +448,7 @@ bool FileRef::isNull() const FileRef &FileRef::operator=(const FileRef &) = default; -void FileRef::swap(FileRef &ref) +void FileRef::swap(FileRef &ref) noexcept { using std::swap; diff --git a/taglib/fileref.h b/taglib/fileref.h index 2804e5cc..749df48a 100644 --- a/taglib/fileref.h +++ b/taglib/fileref.h @@ -363,7 +363,7 @@ namespace TagLib { /*! * Exchanges the content of the FileRef by the content of \a ref. */ - void swap(FileRef &ref); + void swap(FileRef &ref) noexcept; /*! * Returns true if this FileRef and \a ref point to the same File object. diff --git a/taglib/mp4/mp4coverart.cpp b/taglib/mp4/mp4coverart.cpp index 56ec0ca0..248ff3ac 100644 --- a/taglib/mp4/mp4coverart.cpp +++ b/taglib/mp4/mp4coverart.cpp @@ -49,7 +49,7 @@ MP4::CoverArt::CoverArt(const CoverArt &) = default; MP4::CoverArt &MP4::CoverArt::operator=(const CoverArt &) = default; void -MP4::CoverArt::swap(CoverArt &item) +MP4::CoverArt::swap(CoverArt &item) noexcept { using std::swap; diff --git a/taglib/mp4/mp4coverart.h b/taglib/mp4/mp4coverart.h index 24425365..253b1bdb 100644 --- a/taglib/mp4/mp4coverart.h +++ b/taglib/mp4/mp4coverart.h @@ -60,7 +60,7 @@ namespace TagLib { /*! * Exchanges the content of the CoverArt by the content of \a item. */ - void swap(CoverArt &item); + void swap(CoverArt &item) noexcept; //! Format of the image Format format() const; diff --git a/taglib/mp4/mp4item.cpp b/taglib/mp4/mp4item.cpp index 1987fd13..bce5d953 100644 --- a/taglib/mp4/mp4item.cpp +++ b/taglib/mp4/mp4item.cpp @@ -55,7 +55,7 @@ MP4::Item::Item(const Item &) = default; MP4::Item &MP4::Item::operator=(const Item &) = default; void -MP4::Item::swap(Item &item) +MP4::Item::swap(Item &item) noexcept { using std::swap; diff --git a/taglib/mp4/mp4item.h b/taglib/mp4/mp4item.h index 50eb0f4a..962691c9 100644 --- a/taglib/mp4/mp4item.h +++ b/taglib/mp4/mp4item.h @@ -50,7 +50,7 @@ namespace TagLib { /*! * Exchanges the content of the Item by the content of \a item. */ - void swap(Item &item); + void swap(Item &item) noexcept; virtual ~Item(); diff --git a/taglib/toolkit/tbytevector.cpp b/taglib/toolkit/tbytevector.cpp index 0efce566..f65cfff6 100644 --- a/taglib/toolkit/tbytevector.cpp +++ b/taglib/toolkit/tbytevector.cpp @@ -818,7 +818,7 @@ ByteVector &ByteVector::operator=(const char *data) return *this; } -void ByteVector::swap(ByteVector &v) +void ByteVector::swap(ByteVector &v) noexcept { using std::swap; diff --git a/taglib/toolkit/tbytevector.h b/taglib/toolkit/tbytevector.h index d607aedd..918bbd9f 100644 --- a/taglib/toolkit/tbytevector.h +++ b/taglib/toolkit/tbytevector.h @@ -617,7 +617,7 @@ namespace TagLib { /*! * Exchanges the content of the ByteVector by the content of \a v. */ - void swap(ByteVector &v); + void swap(ByteVector &v) noexcept; /*! * Returns a hex-encoded copy of the byte vector. diff --git a/taglib/toolkit/tlist.h b/taglib/toolkit/tlist.h index 406204f4..6f0273e6 100644 --- a/taglib/toolkit/tlist.h +++ b/taglib/toolkit/tlist.h @@ -276,7 +276,7 @@ namespace TagLib { /*! * Exchanges the content of this list by the content of \a l. */ - void swap(List &l); + void swap(List &l) noexcept; /*! * Compares this list with \a l and returns true if all of the elements are diff --git a/taglib/toolkit/tlist.tcc b/taglib/toolkit/tlist.tcc index ac39e4b2..bc253179 100644 --- a/taglib/toolkit/tlist.tcc +++ b/taglib/toolkit/tlist.tcc @@ -317,7 +317,7 @@ List &List::operator=(std::initializer_list init) } template -void List::swap(List &l) +void List::swap(List &l) noexcept { using std::swap; diff --git a/taglib/toolkit/tmap.h b/taglib/toolkit/tmap.h index 709235eb..8404a10d 100644 --- a/taglib/toolkit/tmap.h +++ b/taglib/toolkit/tmap.h @@ -214,7 +214,7 @@ namespace TagLib { /*! * Exchanges the content of this map by the content of \a m. */ - void swap(Map &m); + void swap(Map &m) noexcept; /*! * Compares this map with \a m and returns true if all of the elements are diff --git a/taglib/toolkit/tmap.tcc b/taglib/toolkit/tmap.tcc index a040b6ce..d56013cc 100644 --- a/taglib/toolkit/tmap.tcc +++ b/taglib/toolkit/tmap.tcc @@ -197,7 +197,7 @@ Map &Map::operator=(std::initializer_list -void Map::swap(Map &m) +void Map::swap(Map &m) noexcept { using std::swap; diff --git a/taglib/toolkit/tstring.cpp b/taglib/toolkit/tstring.cpp index ece346a6..c4a628a6 100644 --- a/taglib/toolkit/tstring.cpp +++ b/taglib/toolkit/tstring.cpp @@ -660,7 +660,7 @@ String &String::operator=(const ByteVector &v) return *this; } -void String::swap(String &s) +void String::swap(String &s) noexcept { using std::swap; diff --git a/taglib/toolkit/tstring.h b/taglib/toolkit/tstring.h index 5a4326e1..4d055428 100644 --- a/taglib/toolkit/tstring.h +++ b/taglib/toolkit/tstring.h @@ -498,7 +498,7 @@ namespace TagLib { /*! * Exchanges the content of the String by the content of \a s. */ - void swap(String &s); + void swap(String &s) noexcept; /*! * To be able to use this class in a Map, this operator needed to be