🚨 fix warning

This commit is contained in:
Niels Lohmann 2024-01-28 09:56:34 +01:00
parent ccd47b4e16
commit ea93d752f8
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69
4 changed files with 12 additions and 12 deletions

View File

@ -55,7 +55,7 @@ struct alt_string_iter
return *this;
}
std::string impl{};
std::string impl{}; // NOLINT(readability-redundant-member-init)
};
struct alt_string_data
@ -91,7 +91,7 @@ struct alt_string_data
return *this;
}
std::string impl{};
std::string impl{}; // NOLINT(readability-redundant-member-init)
};
void check_escaped(const char* original, const char* escaped = "", bool ensure_ascii = false);

View File

@ -90,8 +90,8 @@ struct Data
: a(std::move(a_))
, b(std::move(b_))
{}
std::string a{};
std::string b{};
std::string a{}; // NOLINT(readability-redundant-member-init)
std::string b{}; // NOLINT(readability-redundant-member-init)
};
void from_json(const json& j, Data& data);
@ -240,7 +240,7 @@ struct for_3171_base // NOLINT(cppcoreguidelines-special-member-functions)
j.at("str").get_to(str);
}
std::string str{};
std::string str{}; // NOLINT(readability-redundant-member-init)
};
struct for_3171_derived : public for_3171_base

View File

@ -343,7 +343,7 @@ namespace udt
{
struct legacy_type
{
std::string number{};
std::string number{}; // NOLINT(readability-redundant-member-init)
legacy_type() = default;
legacy_type(std::string n) : number(std::move(n)) {}
};
@ -616,7 +616,7 @@ struct small_pod
struct non_pod
{
std::string s{};
std::string s{}; // NOLINT(readability-redundant-member-init)
non_pod() = default;
non_pod(std::string S) : s(std::move(S)) {}
};

View File

@ -18,7 +18,7 @@ namespace persons
class person_with_private_data
{
private:
std::string name{};
std::string name{}; // NOLINT(readability-redundant-member-init)
int age = 0;
json metadata = nullptr;
@ -41,7 +41,7 @@ class person_with_private_data
class person_with_private_data_2
{
private:
std::string name{};
std::string name{}; // NOLINT(readability-redundant-member-init)
int age = 0;
json metadata = nullptr;
@ -77,7 +77,7 @@ class person_with_private_data_2
class person_without_private_data_1
{
public:
std::string name{};
std::string name{}; // NOLINT(readability-redundant-member-init)
int age = 0;
json metadata = nullptr;
@ -99,7 +99,7 @@ class person_without_private_data_1
class person_without_private_data_2
{
public:
std::string name{};
std::string name{}; // NOLINT(readability-redundant-member-init)
int age = 0;
json metadata = nullptr;
@ -121,7 +121,7 @@ NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(person_without_private_data_2, age, name, met
class person_without_private_data_3
{
public:
std::string name{};
std::string name{}; // NOLINT(readability-redundant-member-init)
int age = 0;
json metadata = nullptr;