storage, db, mixer, command: remove more bogus "pure" attributes

This commit is similar to 788e3b31e1,
and removes more "pure" attributes which were placed on functions that
could throw exceptions, which is illegal according to clang's
understanding of the attribute (but not according to GCC's).  GitHub
issue #58 was most likely about StorageDirectoryReader::GetInfo() and
Storage::GetInfo(), which still had "pure" attributes.

Closes #58
This commit is contained in:
Max Kellermann 2017-06-03 21:54:21 +02:00
parent 18b827b979
commit 62b03cfddf
6 changed files with 3 additions and 16 deletions

1
NEWS
View File

@ -2,6 +2,7 @@ ver 0.20.9 (not yet released)
* decoder
- ffmpeg: support *.adx
* fix byte order detection on FreeBSD/aarch64
* fix more random crashes when compiled with clang
ver 0.20.8 (2017/05/19)
* output

View File

@ -45,68 +45,57 @@ public:
: default_value;
}
gcc_pure
int ParseInt(unsigned idx) const {
assert(idx < size);
return ParseCommandArgInt(data[idx]);
}
gcc_pure
int ParseInt(unsigned idx, int min_value, int max_value) const {
assert(idx < size);
return ParseCommandArgInt(data[idx], min_value, max_value);
}
gcc_pure
int ParseUnsigned(unsigned idx) const {
assert(idx < size);
return ParseCommandArgUnsigned(data[idx]);
}
gcc_pure
int ParseUnsigned(unsigned idx, unsigned max_value) const {
assert(idx < size);
return ParseCommandArgUnsigned(data[idx], max_value);
}
gcc_pure
bool ParseBool(unsigned idx) const {
assert(idx < size);
return ParseCommandArgBool(data[idx]);
}
gcc_pure
RangeArg ParseRange(unsigned idx) const {
assert(idx < size);
return ParseCommandArgRange(data[idx]);
}
gcc_pure
float ParseFloat(unsigned idx) const {
assert(idx < size);
return ParseCommandArgFloat(data[idx]);
}
gcc_pure
SongTime ParseSongTime(unsigned idx) const {
assert(idx < size);
return ParseCommandArgSongTime(data[idx]);
}
gcc_pure
SignedSongTime ParseSignedSongTime(unsigned idx) const {
assert(idx < size);
return ParseCommandArgSignedSongTime(data[idx]);
}
gcc_pure
int ParseOptional(unsigned idx, int default_value) const {
return idx < size
? ParseInt(idx)
: default_value;
}
gcc_pure
RangeArg ParseOptional(unsigned idx, RangeArg default_value) const {
return idx < size
? ParseRange(idx)

View File

@ -106,7 +106,6 @@ public:
TagType tag_type, tag_mask_t group_mask,
VisitTag visit_tag) const = 0;
gcc_pure
virtual DatabaseStats GetStats(const DatabaseSelection &selection) const = 0;
/**

View File

@ -84,7 +84,6 @@ public:
* @return the current volume (0..100 including) or -1 if
* unavailable
*/
gcc_pure
virtual int GetVolume() = 0;
/**

View File

@ -63,11 +63,12 @@ public:
/**
* Resamples a block of PCM data.
*
* Throws std::runtime_error on error.
*
* @param src the input buffer
* @return the destination buffer (will be invalidated by
* filter_close() or filter_filter())
*/
gcc_pure
virtual ConstBuffer<void> Resample(ConstBuffer<void> src) = 0;
};

View File

@ -39,7 +39,6 @@ public:
/**
* Throws #std::runtime_error on error.
*/
gcc_pure
virtual StorageFileInfo GetInfo(bool follow) = 0;
};
@ -52,7 +51,6 @@ public:
/**
* Throws #std::runtime_error on error.
*/
gcc_pure
virtual StorageFileInfo GetInfo(const char *uri_utf8, bool follow) = 0;
/**