Commit 62b03cfd authored by Max Kellermann's avatar Max Kellermann

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

This commit is similar to 788e3b31, 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
parent 18b827b9
......@@ -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
......
......@@ -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)
......
......@@ -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;
/**
......
......@@ -84,7 +84,6 @@ public:
* @return the current volume (0..100 including) or -1 if
* unavailable
*/
gcc_pure
virtual int GetVolume() = 0;
/**
......
......@@ -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;
};
......
......@@ -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;
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment