summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-12-12 20:26:59 +0300
committerAndrei Karas <akaras@inbox.ru>2016-12-12 20:26:59 +0300
commitbebb71a3dfadb2b94ba46c0c66f0d40d6ef75e43 (patch)
tree4d631106f76ba8a052dc2ef8b23b8a968040db82 /src/net
parent67638eeec5267977940dce29c5a94ce4d093ed69 (diff)
downloadplus-bebb71a3dfadb2b94ba46c0c66f0d40d6ef75e43.tar.gz
plus-bebb71a3dfadb2b94ba46c0c66f0d40d6ef75e43.tar.bz2
plus-bebb71a3dfadb2b94ba46c0c66f0d40d6ef75e43.tar.xz
plus-bebb71a3dfadb2b94ba46c0c66f0d40d6ef75e43.zip
Add noexcept in some files.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/messagein.h8
-rw-r--r--src/net/serverinfo.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/net/messagein.h b/src/net/messagein.h
index 29b6ef7fb..fb46e9059 100644
--- a/src/net/messagein.h
+++ b/src/net/messagein.h
@@ -47,19 +47,19 @@ class MessageIn notfinal
/**
* Returns the message ID.
*/
- int getId() const A_WARN_UNUSED
+ int getId() const noexcept2 A_WARN_UNUSED
{ return mId; }
/**
* Returns the message length.
*/
- unsigned int getLength() const A_WARN_UNUSED
+ unsigned int getLength() const noexcept2 A_WARN_UNUSED
{ return mLength; }
/**
* Returns the length of unread data.
*/
- unsigned int getUnreadLength() const A_WARN_UNUSED
+ unsigned int getUnreadLength() const noexcept2 A_WARN_UNUSED
{ return mLength > mPos ? mLength - mPos : 0; }
/**< Reads a byte. */
@@ -124,7 +124,7 @@ class MessageIn notfinal
static uint8_t fromServerDirection(const uint8_t serverDir)
A_WARN_UNUSED;
- unsigned int getVersion() const A_WARN_UNUSED
+ unsigned int getVersion() const noexcept2 A_WARN_UNUSED
{ return mVersion; }
protected:
diff --git a/src/net/serverinfo.h b/src/net/serverinfo.h
index 033bf4ad6..5ae327d47 100644
--- a/src/net/serverinfo.h
+++ b/src/net/serverinfo.h
@@ -122,7 +122,7 @@ class ServerInfo final
return *this;
}
- bool isValid() const A_WARN_UNUSED
+ bool isValid() const noexcept2 A_WARN_UNUSED
{
return !(hostname.empty()
|| port == 0