From 3aa9e0cd15c98687648250bb6fa482dc4184e614 Mon Sep 17 00:00:00 2001 From: Joe George Date: Thu, 17 Oct 2024 11:00:04 -0400 Subject: [PATCH] review fixes --- config/makeprops.py | 6 +++--- cpp/src/Ice/MetricsAdminI.cpp | 2 +- cpp/src/Ice/Properties.cpp | 6 +++--- cpp/src/Ice/PropertyUtil.cpp | 2 +- cpp/src/Ice/PropertyUtil.h | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/config/makeprops.py b/config/makeprops.py index 98a5b7a306d..5c462ce7f1a 100755 --- a/config/makeprops.py +++ b/config/makeprops.py @@ -265,7 +265,7 @@ def openFiles(self): const int length; }}; - class ICE_API PropertyNames + class PropertyNames {{ public: """) @@ -280,7 +280,7 @@ class ICE_API PropertyNames @override def closeFiles(self): self.hFile.write(f""" - static const std::array validProps; + static const std::array validProps; }}; }} @@ -288,7 +288,7 @@ def closeFiles(self): """) self.cppFile.write(f"""\ -const std::array PropertyNames::validProps = +const std::array PropertyNames::validProps = {{ {",\n ".join([f"{name}Props" for name in self.generatedPropertyArrays()])} }}; diff --git a/cpp/src/Ice/MetricsAdminI.cpp b/cpp/src/Ice/MetricsAdminI.cpp index c62d3a29faf..f987337a2c3 100644 --- a/cpp/src/Ice/MetricsAdminI.cpp +++ b/cpp/src/Ice/MetricsAdminI.cpp @@ -62,7 +62,7 @@ namespace { os << "\n " << prop; } - throw UnknownPropertyException(__FILE__, __LINE__, os.str()); + throw UnknownPropertyException{__FILE__, __LINE__, os.str()}; } } diff --git a/cpp/src/Ice/Properties.cpp b/cpp/src/Ice/Properties.cpp index 0ff57f1536d..af07c811c78 100644 --- a/cpp/src/Ice/Properties.cpp +++ b/cpp/src/Ice/Properties.cpp @@ -60,7 +60,7 @@ namespace if (!propertyArray) { - throw UnknownPropertyException(__FILE__, __LINE__, "unknown Ice property: " + string{key}); + throw UnknownPropertyException{__FILE__, __LINE__, "unknown Ice property: " + string{key}}; } // The Ice property prefix. @@ -70,7 +70,7 @@ namespace if (!prop) { - throw UnknownPropertyException(__FILE__, __LINE__, "unknown Ice property: " + string{key}); + throw UnknownPropertyException{__FILE__, __LINE__, "unknown Ice property: " + string{key}}; } return prop->defaultValue; @@ -319,7 +319,7 @@ Ice::Properties::setProperty(string_view key, string_view value) auto prop = IceInternal::findProperty(key.substr(propertyPrefix.length() + 1), *propertyArray); if (!prop) { - throw UnknownPropertyException(__FILE__, __LINE__, "unknown Ice property: " + string{key}); + throw UnknownPropertyException{__FILE__, __LINE__, "unknown Ice property: " + string{key}}; } // If the property is deprecated, log a warning. diff --git a/cpp/src/Ice/PropertyUtil.cpp b/cpp/src/Ice/PropertyUtil.cpp index 56fff1cfb1c..65bc6527768 100644 --- a/cpp/src/Ice/PropertyUtil.cpp +++ b/cpp/src/Ice/PropertyUtil.cpp @@ -95,6 +95,6 @@ IceInternal::validatePropertiesWithPrefix( os << "\n " << prop; } - throw UnknownPropertyException(__FILE__, __LINE__, os.str()); + throw UnknownPropertyException{__FILE__, __LINE__, os.str()}; } } diff --git a/cpp/src/Ice/PropertyUtil.h b/cpp/src/Ice/PropertyUtil.h index 10e2d1e6170..55601e3efb9 100644 --- a/cpp/src/Ice/PropertyUtil.h +++ b/cpp/src/Ice/PropertyUtil.h @@ -22,7 +22,7 @@ namespace IceInternal /// @param properties The properties to consider. /// @param propertyArray The property array to search against. /// @throws UnknownPropertyException if unknown properties are found. - ICE_API void validatePropertiesWithPrefix( + void validatePropertiesWithPrefix( std::string_view prefix, const Ice::PropertiesPtr& properties, const PropertyArray* propertyArray);