Improve const correctness.

See https://usfirst.collab.net/sf/tracker/do/viewArtifact/projects.wpilib/tracker.4_defects/artf4148

Change-Id: I47b0d5a91fd49e47e2c7348b0705e998ec815682
This commit is contained in:
Tyler Veness
2015-06-19 17:23:54 -07:00
parent c6b790cadd
commit 5598445a67
172 changed files with 1165 additions and 1140 deletions

View File

@@ -36,7 +36,7 @@ public:
TableKeyExistsWithDifferentTypeException(const std::string existingKey, NetworkTableEntryType* existingType, const char* message);
const char* what(){return "TableKeyExistsWithDifferentTypeException";};
const char* what() const noexcept {return "TableKeyExistsWithDifferentTypeException";};
virtual ~TableKeyExistsWithDifferentTypeException() throw ();
};

View File

@@ -16,7 +16,7 @@ class BadMessageException : public std::exception
public:
BadMessageException(const char* message);
~BadMessageException() throw ();
const char* what();
const char* what() const noexcept;
private:
std::string message;
};

View File

@@ -36,7 +36,7 @@ public:
*
* @return The message associated with this exception.
*/
const char* what();
const char* what() const noexcept;
/**
* Determines whether this exception indicates that an EOF

View File

@@ -14,7 +14,7 @@
class IllegalStateException : public std::exception{
public:
IllegalStateException(const char* message);
const char* what(){return message.c_str();};
const char* what() const noexcept {return message.c_str();};
~IllegalStateException() throw ();
private:
std::string message;

View File

@@ -17,7 +17,7 @@ BadMessageException::~BadMessageException() throw ()
{
}
const char* BadMessageException::what()
const char* BadMessageException::what() const noexcept
{
return message.c_str();
}

View File

@@ -13,7 +13,7 @@
IOException::IOException(const char* msg) : message(strdup(msg)), errorValue(0){}
IOException::IOException(const char* msg, int _errorValue) : message(strdup(msg)), errorValue(_errorValue){}
const char* IOException::what(){
const char* IOException::what() const noexcept {
return message;
}