🚨 fix warnings

This commit is contained in:
Niels Lohmann 2021-01-28 15:44:04 +01:00
parent cdd6412ab2
commit 09bf771fd4
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69
3 changed files with 5 additions and 3 deletions

View File

@ -31,3 +31,5 @@ Checks: '*,
CheckOptions: CheckOptions:
- key: hicpp-special-member-functions.AllowSoleDefaultDtor - key: hicpp-special-member-functions.AllowSoleDefaultDtor
value: 1 value: 1
HeaderFilterRegex: '.*nlohmann.*'

View File

@ -39,7 +39,7 @@ template<typename IteratorType> class iteration_proxy_value
/// a string representation of the array index /// a string representation of the array index
mutable string_type array_index_str = "0"; mutable string_type array_index_str = "0";
/// an empty string (to return a reference for primitive values) /// an empty string (to return a reference for primitive values)
const string_type empty_str; const string_type empty_str{};
public: public:
explicit iteration_proxy_value(IteratorType it) noexcept : anchor(it) {} explicit iteration_proxy_value(IteratorType it) noexcept : anchor(it) {}

View File

@ -618,8 +618,8 @@ struct small_pod
struct non_pod struct non_pod
{ {
std::string s; std::string s{};
non_pod() : s() {} non_pod() = default;
non_pod(std::string S) : s(std::move(S)) {} non_pod(std::string S) : s(std::move(S)) {}
}; };