*: 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:
@@ -107,7 +107,7 @@ cue_parse_rem(char *p, TagBuilder &tag)
|
||||
}
|
||||
|
||||
TagBuilder *
|
||||
CueParser::GetCurrentTag()
|
||||
CueParser::GetCurrentTag() noexcept
|
||||
{
|
||||
if (state == HEADER)
|
||||
return &header_tag;
|
||||
@@ -139,7 +139,7 @@ cue_parse_position(const char *p)
|
||||
}
|
||||
|
||||
void
|
||||
CueParser::Commit()
|
||||
CueParser::Commit() noexcept
|
||||
{
|
||||
/* the caller of this library must call cue_parser_get() often
|
||||
enough */
|
||||
@@ -158,7 +158,7 @@ CueParser::Commit()
|
||||
}
|
||||
|
||||
void
|
||||
CueParser::Feed2(char *p)
|
||||
CueParser::Feed2(char *p) noexcept
|
||||
{
|
||||
assert(!end);
|
||||
assert(p != nullptr);
|
||||
@@ -260,7 +260,7 @@ CueParser::Feed2(char *p)
|
||||
}
|
||||
|
||||
void
|
||||
CueParser::Feed(const char *line)
|
||||
CueParser::Feed(const char *line) noexcept
|
||||
{
|
||||
assert(!end);
|
||||
assert(line != nullptr);
|
||||
@@ -271,7 +271,7 @@ CueParser::Feed(const char *line)
|
||||
}
|
||||
|
||||
void
|
||||
CueParser::Finish()
|
||||
CueParser::Finish() noexcept
|
||||
{
|
||||
if (end)
|
||||
/* has already been called, ignore */
|
||||
@@ -282,7 +282,7 @@ CueParser::Finish()
|
||||
}
|
||||
|
||||
std::unique_ptr<DetachedSong>
|
||||
CueParser::Get()
|
||||
CueParser::Get() noexcept
|
||||
{
|
||||
if (finished == nullptr && end) {
|
||||
/* cue_parser_finish() has been called already:
|
||||
|
@@ -98,14 +98,14 @@ public:
|
||||
* Feed a text line from the CUE file into the parser. Call
|
||||
* Get() after this to see if a song has been finished.
|
||||
*/
|
||||
void Feed(const char *line);
|
||||
void Feed(const char *line) noexcept;
|
||||
|
||||
/**
|
||||
* Tell the parser that the end of the file has been reached. Call
|
||||
* Get() after this to see if a song has been finished.
|
||||
* This procedure must be done twice!
|
||||
*/
|
||||
void Finish();
|
||||
void Finish() noexcept;
|
||||
|
||||
/**
|
||||
* Check if a song was finished by the last Feed() or Finish()
|
||||
@@ -114,20 +114,20 @@ public:
|
||||
* @return a song object that must be freed by the caller, or NULL if
|
||||
* no song was finished at this time
|
||||
*/
|
||||
std::unique_ptr<DetachedSong> Get();
|
||||
std::unique_ptr<DetachedSong> Get() noexcept;
|
||||
|
||||
private:
|
||||
gcc_pure
|
||||
TagBuilder *GetCurrentTag();
|
||||
TagBuilder *GetCurrentTag() noexcept;
|
||||
|
||||
/**
|
||||
* Commit the current song. It will be moved to "previous",
|
||||
* so the next song may soon edit its end time (using the next
|
||||
* song's start time).
|
||||
*/
|
||||
void Commit();
|
||||
void Commit() noexcept;
|
||||
|
||||
void Feed2(char *p);
|
||||
void Feed2(char *p) noexcept;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user