summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReuben Thomas <rrt@sc3d.org>2017-02-04 18:38:06 +0000
committerReuben Thomas <rrt@sc3d.org>2017-02-09 00:28:24 +0000
commit0115a4c6c76bffbb1bd6a6c2497fcec05304ce33 (patch)
treebabc97ec145d37ab7b1b9c457d204c824f196ac4
parenta087a5a05d4d43b84247bd3af5c05b0673db89b7 (diff)
downloadenchant-0115a4c6c76bffbb1bd6a6c2497fcec05304ce33.tar.gz
Use C++11’s noexcept to simplify exception declaration and avoid warnings
Also make what() const (A simplified version of a patch provided by Hubert Figuière.)
-rw-r--r--src/enchant++.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/enchant++.h b/src/enchant++.h
index 5ec98d6..7db635d 100644
--- a/src/enchant++.h
+++ b/src/enchant++.h
@@ -49,16 +49,14 @@ namespace enchant
m_ex = ex;
}
- virtual ~Exception () throw() {
+ virtual ~Exception () noexcept {
}
- virtual const char * what () const throw() {
+ virtual const char * what () const noexcept {
return m_ex.c_str();
}
private:
- Exception ();
-
std::string m_ex;
};