*: 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:
Max Kellermann
2017-05-08 14:44:49 +02:00
parent ac2e4e593d
commit 71f0ed8b74
272 changed files with 873 additions and 846 deletions

View File

@@ -169,7 +169,7 @@ ReadServers(NeighborExplorer::List &list, const char *uri)
gcc_pure
static NeighborExplorer::List
DetectServers()
DetectServers() noexcept
{
NeighborExplorer::List list;
const std::lock_guard<Mutex> protect(smbclient_mutex);
@@ -181,7 +181,7 @@ gcc_pure
static NeighborExplorer::List::const_iterator
FindBeforeServerByURI(NeighborExplorer::List::const_iterator prev,
NeighborExplorer::List::const_iterator end,
const std::string &uri)
const std::string &uri) noexcept
{
for (auto i = std::next(prev); i != end; prev = i, i = std::next(prev))
if (i->uri == uri)