*: add "noexcept" to many, many function prototypes
This eliminates some overhead, because the compiler doesn't need to consider these functions throwing.
This commit is contained in:
@@ -40,23 +40,23 @@ struct ReplayGainTuple {
|
||||
}
|
||||
|
||||
gcc_pure
|
||||
float CalculateScale(const ReplayGainConfig &config) const;
|
||||
float CalculateScale(const ReplayGainConfig &config) const noexcept;
|
||||
};
|
||||
|
||||
struct ReplayGainInfo {
|
||||
ReplayGainTuple track, album;
|
||||
|
||||
constexpr bool IsDefined() const {
|
||||
constexpr bool IsDefined() const noexcept {
|
||||
return track.IsDefined() || album.IsDefined();
|
||||
}
|
||||
|
||||
const ReplayGainTuple &Get(ReplayGainMode mode) const {
|
||||
const ReplayGainTuple &Get(ReplayGainMode mode) const noexcept {
|
||||
return mode == ReplayGainMode::ALBUM
|
||||
? (album.IsDefined() ? album : track)
|
||||
: (track.IsDefined() ? track : album);
|
||||
}
|
||||
|
||||
void Clear() {
|
||||
void Clear() noexcept {
|
||||
track.Clear();
|
||||
album.Clear();
|
||||
}
|
||||
|
Reference in New Issue
Block a user