*: add lost of "noexcept" specifications

This commit is contained in:
Max Kellermann
2017-06-03 21:33:44 +02:00
parent 62b03cfddf
commit a057b4f6d8
65 changed files with 246 additions and 241 deletions

View File

@@ -53,7 +53,7 @@ ParseMixRampTag(MixRampInfo &info, const char *name, const char *value)
const char *value;
gcc_pure
const char *operator[](const char *n) const {
const char *operator[](const char *n) const noexcept {
return StringEqualsCaseASCII(name, n)
? value
: nullptr;
@@ -70,7 +70,7 @@ ParseMixRampVorbis(MixRampInfo &info, const char *entry)
const char *entry;
gcc_pure
const char *operator[](const char *n) const {
const char *operator[](const char *n) const noexcept {
return vorbis_comment_value(entry, n);
}
};

View File

@@ -60,7 +60,7 @@ ParseReplayGainTag(ReplayGainInfo &info, const char *name, const char *value)
const char *value;
gcc_pure
const char *operator[](const char *n) const {
const char *operator[](const char *n) const noexcept {
return StringEqualsCaseASCII(name, n)
? value
: nullptr;
@@ -77,7 +77,7 @@ ParseReplayGainVorbis(ReplayGainInfo &info, const char *entry)
const char *entry;
gcc_pure
const char *operator[](const char *n) const {
const char *operator[](const char *n) const noexcept {
return vorbis_comment_value(entry, n);
}
};

View File

@@ -67,7 +67,7 @@ CopyTagMask(TagBuilder &dest, const Tag &src, tag_mask_t mask)
void
TagSet::InsertUnique(const Tag &src, TagType type, const char *value,
tag_mask_t group_mask)
tag_mask_t group_mask) noexcept
{
TagBuilder builder;
if (value == nullptr)
@@ -85,7 +85,7 @@ TagSet::InsertUnique(const Tag &src, TagType type, const char *value,
bool
TagSet::CheckUnique(TagType dest_type,
const Tag &tag, TagType src_type,
tag_mask_t group_mask)
tag_mask_t group_mask) noexcept
{
bool found = false;
@@ -101,7 +101,7 @@ TagSet::CheckUnique(TagType dest_type,
void
TagSet::InsertUnique(const Tag &tag,
TagType type, tag_mask_t group_mask)
TagType type, tag_mask_t group_mask) noexcept
{
static_assert(sizeof(group_mask) * 8 >= TAG_NUM_OF_ITEM_TYPES,
"Mask is too small");

View File

@@ -33,7 +33,7 @@
*/
struct TagLess {
gcc_pure
bool operator()(const Tag &a, const Tag &b) const {
bool operator()(const Tag &a, const Tag &b) const noexcept {
if (a.num_items != b.num_items)
return a.num_items < b.num_items;
@@ -59,15 +59,15 @@ struct TagLess {
class TagSet : public std::set<Tag, TagLess> {
public:
void InsertUnique(const Tag &tag,
TagType type, tag_mask_t group_mask);
TagType type, tag_mask_t group_mask) noexcept;
private:
void InsertUnique(const Tag &src, TagType type, const char *value,
tag_mask_t group_mask);
tag_mask_t group_mask) noexcept;
bool CheckUnique(TagType dest_type,
const Tag &tag, TagType src_type,
tag_mask_t group_mask);
tag_mask_t group_mask) noexcept;
};
#endif

View File

@@ -82,7 +82,7 @@ public:
* Returns true if the object contains any information.
*/
gcc_pure
bool IsDefined() const {
bool IsDefined() const noexcept {
return !duration.IsNegative() || has_playlist || !IsEmpty();
}