Skip to content

Commit

Permalink
review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
externl committed Oct 17, 2024
1 parent ec2d985 commit 3aa9e0c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions config/makeprops.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def openFiles(self):
const int length;
}};
class ICE_API PropertyNames
class PropertyNames
{{
public:
""")
Expand All @@ -280,15 +280,15 @@ class ICE_API PropertyNames
@override
def closeFiles(self):
self.hFile.write(f"""
static const std::array<PropertyArray,{len(self.generatedPropertyArrays())}> validProps;
static const std::array<PropertyArray, {len(self.generatedPropertyArrays())}> validProps;
}};
}}
#endif
""")

self.cppFile.write(f"""\
const std::array<PropertyArray,{len(self.generatedPropertyArrays())}> PropertyNames::validProps =
const std::array<PropertyArray, {len(self.generatedPropertyArrays())}> PropertyNames::validProps =
{{
{",\n ".join([f"{name}Props" for name in self.generatedPropertyArrays()])}
}};
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/Ice/MetricsAdminI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ namespace
{
os << "\n " << prop;
}
throw UnknownPropertyException(__FILE__, __LINE__, os.str());
throw UnknownPropertyException{__FILE__, __LINE__, os.str()};
}
}

Expand Down
6 changes: 3 additions & 3 deletions cpp/src/Ice/Properties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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;
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/Ice/PropertyUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,6 @@ IceInternal::validatePropertiesWithPrefix(
os << "\n " << prop;
}

throw UnknownPropertyException(__FILE__, __LINE__, os.str());
throw UnknownPropertyException{__FILE__, __LINE__, os.str()};
}
}
2 changes: 1 addition & 1 deletion cpp/src/Ice/PropertyUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3aa9e0c

Please sign in to comment.