clang-tidy fixes again (#1155)
* [clang-tidy] remove redundant string initialization
Found with readability-redundant-string-init
Signed-off-by: Rosen Penev <rosenp@gmail.com>
* [clang-tidy] switch to raw strings
Easier to read.
Found with modernize-raw-string-literal
Signed-off-by: Rosen Penev <rosenp@gmail.com>
* [clang-tidy] fix performance issues
Found with performance*
Signed-off-by: Rosen Penev <rosenp@gmail.com>
* fix extra comma warnings
Found with clang's -Wextra-semi-stmt
Signed-off-by: Rosen Penev <rosenp@gmail.com>
* remove JSONCPP_OP_EXPLICIT
This codebase in C++11. No need for compatibility with C++98.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
* remove JSONCPP_NOEXCEPT
This codebase is C++11 now. No need for this macro.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
diff --git a/include/json/value.h b/include/json/value.h
index bea2a56..dffc51a 100644
--- a/include/json/value.h
+++ b/include/json/value.h
@@ -67,8 +67,8 @@
class JSON_API Exception : public std::exception {
public:
Exception(String msg);
- ~Exception() JSONCPP_NOEXCEPT override;
- char const* what() const JSONCPP_NOEXCEPT override;
+ ~Exception() noexcept override;
+ char const* what() const noexcept override;
protected:
String msg_;
@@ -421,7 +421,7 @@
bool empty() const;
/// Return !isNull()
- JSONCPP_OP_EXPLICIT operator bool() const;
+ explicit operator bool() const;
/// Remove all object members and array elements.
/// \pre type() is arrayValue, objectValue, or nullValue