Commit f74ae543 authored by Vincent Cogne's avatar Vincent Cogne Committed by Jesse Beder
Browse files

Fix some clang warnings (#378)

* Remove extra semicolon

* Fix automatic type conversion

* Replace dynamic exception specifications by C++11 noexcept

* Fix deprecated definition of implicit copy constructor for 'Exception'
parent 7c33b3cd
......@@ -162,12 +162,12 @@ inline Emitter& Emitter::WriteStreamable(T value) {
template <>
inline void Emitter::SetStreamablePrecision<float>(std::stringstream& stream) {
stream.precision(GetFloatPrecision());
stream.precision(static_cast<std::streamsize>(GetFloatPrecision()));
}
template <>
inline void Emitter::SetStreamablePrecision<double>(std::stringstream& stream) {
stream.precision(GetDoublePrecision());
stream.precision(static_cast<std::streamsize>(GetDoublePrecision()));
}
// overloads of insertion
......
......@@ -112,7 +112,9 @@ class Exception : public std::runtime_error {
public:
Exception(const Mark& mark_, const std::string& msg_)
: std::runtime_error(build_what(mark_, msg_)), mark(mark_), msg(msg_) {}
virtual ~Exception() throw() {}
virtual ~Exception() noexcept {}
Exception(const Exception&) = default;
Mark mark;
std::string msg;
......@@ -163,7 +165,7 @@ class TypedKeyNotFound : public KeyNotFound {
public:
TypedKeyNotFound(const Mark& mark_, const T& key_)
: KeyNotFound(mark_, key_), key(key_) {}
virtual ~TypedKeyNotFound() throw() {}
virtual ~TypedKeyNotFound() noexcept {}
T key;
};
......
......@@ -58,7 +58,7 @@ class YAML_CPP_API Node {
bool IsMap() const { return Type() == NodeType::Map; }
// bool conversions
YAML_CPP_OPERATOR_BOOL();
YAML_CPP_OPERATOR_BOOL()
bool operator!() const { return !IsDefined(); }
// access
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment