Fix Clang compiler warnings (-Wshadow)

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
This commit is contained in:
Ferry Huberts 2023-09-02 21:21:32 +02:00
parent 244a86118d
commit a93fa88897
3 changed files with 9 additions and 10 deletions

View File

@ -305,7 +305,6 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compiler_flags(99 "-Wno-return-std-move-in-c++11")
add_compiler_flags(10 "-Wno-reserved-id-macro")
add_compiler_flags(14 "-Wno-reserved-identifier")
add_compiler_flags(10 "-Wno-shadow")
add_compiler_flags(10 "-Wno-sign-conversion")
add_compiler_flags(10 "-Wno-string-conversion")
add_compiler_flags(14 "-Wno-suggest-destructor-override")

View File

@ -41,16 +41,16 @@ const std::list<oatpp::String>& Endpoint::Info::Params::getOrder() const {
return m_order;
}
Endpoint::Info::Param& Endpoint::Info::Params::add(const oatpp::String& name, oatpp::data::mapping::type::Type* type) {
m_order.push_back(name);
Endpoint::Info::Param& param = operator [](name);
param.name = name;
Endpoint::Info::Param& Endpoint::Info::Params::add(const oatpp::String& aname, oatpp::data::mapping::type::Type* type) {
m_order.push_back(aname);
Endpoint::Info::Param& param = operator [](aname);
param.name = aname;
param.type = type;
return param;
}
Endpoint::Info::Param& Endpoint::Info::Params::operator [](const oatpp::String& name) {
return m_params[name];
Endpoint::Info::Param& Endpoint::Info::Params::operator [](const oatpp::String& aname) {
return m_params[aname];
}
Endpoint::Info::Info() : hide(false)

View File

@ -97,12 +97,12 @@ public:
/**
* Add parameter name to list order
* @tparam T
* @param name
* @param aname
* @return new or existing parameter
*/
template<class T>
Param& add(const oatpp::String& name) {
return add(name, T::Class::getType());
Param& add(const oatpp::String& aname) {
return add(aname, T::Class::getType());
}
/**