This commit is contained in:
Rodrigo Faselli
2026-05-16 12:56:00 -03:00
committed by GitHub
parent a0e1aa2507
commit b3fe733bf2

View File

@@ -774,9 +774,6 @@ public:
bool operator==(const ConfigOptionFloat &rhs) const throw() { return is_approx(this->value, rhs.value); } bool operator==(const ConfigOptionFloat &rhs) const throw() { return is_approx(this->value, rhs.value); }
bool operator< (const ConfigOptionFloat &rhs) const throw() { return this->value < rhs.value; } bool operator< (const ConfigOptionFloat &rhs) const throw() { return this->value < rhs.value; }
// Warning mitigation: Indicate that virtual operator == is not forgotten
using ConfigOptionSingle<double>::operator ==;
std::string serialize() const override std::string serialize() const override
{ {
std::ostringstream ss; std::ostringstream ss;
@@ -845,9 +842,6 @@ public:
this->values[i] = nil_value(); this->values[i] = nil_value();
} }
// Warning mitigation: Indicate that virtual operator == is not forgotten
using ConfigOptionVector<double>::operator ==;
std::string serialize() const override std::string serialize() const override
{ {
std::ostringstream ss; std::ostringstream ss;
@@ -971,9 +965,6 @@ public:
ConfigOption* clone() const override { return new ConfigOptionInt(*this); } ConfigOption* clone() const override { return new ConfigOptionInt(*this); }
bool operator==(const ConfigOptionInt &rhs) const throw() { return this->value == rhs.value; } bool operator==(const ConfigOptionInt &rhs) const throw() { return this->value == rhs.value; }
// Warning mitigation: Indicate that virtual operator == is not forgotten.
using ConfigOptionSingle<int>::operator ==;
std::string serialize() const override std::string serialize() const override
{ {
std::ostringstream ss; std::ostringstream ss;
@@ -1029,9 +1020,6 @@ public:
this->values[i] = nil_value(); this->values[i] = nil_value();
} }
// Warning mitigation: Indicate that virtual operator == is not forgotten
using ConfigOptionVector<int>::operator ==;
std::string serialize() const override std::string serialize() const override
{ {
std::ostringstream ss; std::ostringstream ss;
@@ -1110,9 +1098,6 @@ public:
bool operator< (const ConfigOptionString &rhs) const throw() { return this->value < rhs.value; } bool operator< (const ConfigOptionString &rhs) const throw() { return this->value < rhs.value; }
bool empty() const { return this->value.empty(); } bool empty() const { return this->value.empty(); }
// Warning mitigation: Indicate that virtual operator == is not forgotten
using ConfigOptionSingle<std::string>::operator ==;
std::string serialize() const override std::string serialize() const override
{ {
return escape_string_cstyle(this->value); return escape_string_cstyle(this->value);
@@ -1147,9 +1132,6 @@ public:
bool operator< (const ConfigOptionStrings &rhs) const throw() { return this->values < rhs.values; } bool operator< (const ConfigOptionStrings &rhs) const throw() { return this->values < rhs.values; }
bool is_nil(size_t) const override { return false; } bool is_nil(size_t) const override { return false; }
// Warning mitigation: Indicate that virtual operator == is not forgotten
using ConfigOptionVector<std::string>::operator ==;
std::string serialize() const override std::string serialize() const override
{ {
return escape_strings_cstyle(this->values); return escape_strings_cstyle(this->values);
@@ -1195,9 +1177,6 @@ public:
double get_abs_value(double ratio_over) const { return ratio_over * this->value / 100; } double get_abs_value(double ratio_over) const { return ratio_over * this->value / 100; }
// Warning mitigation: Indicate that virtual operator == is not forgotten
using ConfigOptionFloat::operator ==;
std::string serialize() const override std::string serialize() const override
{ {
std::ostringstream ss; std::ostringstream ss;
@@ -1238,9 +1217,6 @@ public:
bool operator==(const ConfigOptionPercentsTempl &rhs) const throw() { return ConfigOptionFloatsTempl<NULLABLE>::vectors_equal(this->values, rhs.values); } bool operator==(const ConfigOptionPercentsTempl &rhs) const throw() { return ConfigOptionFloatsTempl<NULLABLE>::vectors_equal(this->values, rhs.values); }
bool operator< (const ConfigOptionPercentsTempl &rhs) const throw() { return ConfigOptionFloatsTempl<NULLABLE>::vectors_lower(this->values, rhs.values); } bool operator< (const ConfigOptionPercentsTempl &rhs) const throw() { return ConfigOptionFloatsTempl<NULLABLE>::vectors_lower(this->values, rhs.values); }
// Warning mitigation: Indicate that virtual operator == is not forgotten
using ConfigOptionFloatsTempl<NULLABLE>::operator ==;
std::string serialize() const override std::string serialize() const override
{ {
std::ostringstream ss; std::ostringstream ss;
@@ -1315,9 +1291,6 @@ public:
*this = *static_cast<const ConfigOptionFloatOrPercent*>(rhs); *this = *static_cast<const ConfigOptionFloatOrPercent*>(rhs);
} }
// Warning mitigation: Indicate that virtual operator == is not forgotten
using ConfigOptionPercent::operator ==;
std::string serialize() const override std::string serialize() const override
{ {
std::ostringstream ss; std::ostringstream ss;
@@ -1376,9 +1349,6 @@ public:
this->values[i] = nil_value(); this->values[i] = nil_value();
} }
// Warning mitigation: Indicate that virtual operator == is not forgotten
using ConfigOptionVector<FloatOrPercent>::operator ==;
std::string serialize() const override std::string serialize() const override
{ {
std::ostringstream ss; std::ostringstream ss;
@@ -1492,9 +1462,6 @@ public:
bool operator==(const ConfigOptionPoint &rhs) const throw() { return this->value == rhs.value; } bool operator==(const ConfigOptionPoint &rhs) const throw() { return this->value == rhs.value; }
bool operator< (const ConfigOptionPoint &rhs) const throw() { return this->value < rhs.value; } bool operator< (const ConfigOptionPoint &rhs) const throw() { return this->value < rhs.value; }
// Warning mitigation: Indicate that virtual operator == is not forgotten
using ConfigOptionSingle<Vec2d>::operator ==;
std::string serialize() const override std::string serialize() const override
{ {
std::ostringstream ss; std::ostringstream ss;
@@ -1534,9 +1501,6 @@ public:
{ return std::lexicographical_compare(this->values.begin(), this->values.end(), rhs.values.begin(), rhs.values.end(), [](const auto &l, const auto &r){ return l < r; }); } { return std::lexicographical_compare(this->values.begin(), this->values.end(), rhs.values.begin(), rhs.values.end(), [](const auto &l, const auto &r){ return l < r; }); }
bool is_nil(size_t) const override { return false; } bool is_nil(size_t) const override { return false; }
// Warning mitigation: Indicate that virtual operator == is not forgotten
using ConfigOptionVector<Vec2d>::operator ==;
std::string serialize() const override std::string serialize() const override
{ {
std::ostringstream ss; std::ostringstream ss;
@@ -1614,9 +1578,6 @@ public:
bool operator< (const ConfigOptionPoint3 &rhs) const throw() bool operator< (const ConfigOptionPoint3 &rhs) const throw()
{ return this->value.x() < rhs.value.x() || (this->value.x() == rhs.value.x() && (this->value.y() < rhs.value.y() || (this->value.y() == rhs.value.y() && this->value.z() < rhs.value.z()))); } { return this->value.x() < rhs.value.x() || (this->value.x() == rhs.value.x() && (this->value.y() < rhs.value.y() || (this->value.y() == rhs.value.y() && this->value.z() < rhs.value.z()))); }
// Warning mitigation: Indicate that virtual operator == is not forgotten
using ConfigOptionSingle<Vec3d>::operator ==;
std::string serialize() const override std::string serialize() const override
{ {
std::ostringstream ss; std::ostringstream ss;
@@ -1663,9 +1624,6 @@ public:
bool nullable() const override { return false; } bool nullable() const override { return false; }
bool is_nil(size_t) const override { return false; } bool is_nil(size_t) const override { return false; }
// Warning mitigation: Indicate that virtual operator == is not forgotten
using ConfigOptionVector<Vec2ds>::operator ==;
std::string serialize()const override std::string serialize()const override
{ {
std::ostringstream ss; std::ostringstream ss;
@@ -1779,9 +1737,6 @@ public:
bool nullable() const override { return false; } bool nullable() const override { return false; }
bool is_nil(size_t) const override { return false; } bool is_nil(size_t) const override { return false; }
// Warning mitigation: Indicate that virtual operator == is not forgotten
using ConfigOptionVector<std::vector<int>>::operator ==;
std::string serialize() const override std::string serialize() const override
{ {
std::ostringstream ss; std::ostringstream ss;
@@ -1865,9 +1820,6 @@ public:
bool operator==(const ConfigOptionBool &rhs) const throw() { return this->value == rhs.value; } bool operator==(const ConfigOptionBool &rhs) const throw() { return this->value == rhs.value; }
bool operator< (const ConfigOptionBool &rhs) const throw() { return int(this->value) < int(rhs.value); } bool operator< (const ConfigOptionBool &rhs) const throw() { return int(this->value) < int(rhs.value); }
// Warning mitigation: Indicate that virtual operator == is not forgotten
using ConfigOptionSingle<bool>::operator ==;
std::string serialize() const override std::string serialize() const override
{ {
return std::string(this->value ? "1" : "0"); return std::string(this->value ? "1" : "0");
@@ -1939,9 +1891,6 @@ public:
//FIXME this smells, the parent class has the method declared returning (unsigned char&). //FIXME this smells, the parent class has the method declared returning (unsigned char&).
bool get_at(size_t i) const { return ((i < this->values.size()) ? this->values[i] : this->values.front()) != 0; } bool get_at(size_t i) const { return ((i < this->values.size()) ? this->values[i] : this->values.front()) != 0; }
// Warning mitigation: Indicate that virtual operator == is not forgotten
using ConfigOptionVector<unsigned char>::operator ==;
std::string serialize() const override std::string serialize() const override
{ {
std::ostringstream ss; std::ostringstream ss;
@@ -2054,9 +2003,6 @@ public:
this->value = (T)rhs->getInt(); this->value = (T)rhs->getInt();
} }
// Warning mitigation: Indicate that virtual operator == is not forgotten
using ConfigOptionSingle<T>::operator ==;
std::string serialize() const override std::string serialize() const override
{ {
const t_config_enum_names& names = ConfigOptionEnum<T>::get_enum_names(); const t_config_enum_names& names = ConfigOptionEnum<T>::get_enum_names();
@@ -2127,9 +2073,6 @@ public:
this->value = rhs->getInt(); this->value = rhs->getInt();
} }
// Warning mitigation: Indicate that virtual operator == is not forgotten
using ConfigOptionInt::operator ==;
std::string serialize() const override std::string serialize() const override
{ {
for (const auto &kvp : *this->keys_map) for (const auto &kvp : *this->keys_map)
@@ -2187,9 +2130,6 @@ public:
this->values = dynamic_cast<const ConfigOptionEnumsGenericTempl *>(rhs)->values; this->values = dynamic_cast<const ConfigOptionEnumsGenericTempl *>(rhs)->values;
} }
// Warning mitigation: Indicate that virtual operator == is not forgotten
using ConfigOptionInts::operator ==;
std::string serialize() const override std::string serialize() const override
{ {
std::ostringstream ss; std::ostringstream ss;