mirror of
https://gitee.com/zyjblog/oatpp.git
synced 2024-12-22 22:16:37 +08:00
Fix Clang compiler warnings (-Wshadow)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
This commit is contained in:
parent
244a86118d
commit
a93fa88897
@ -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")
|
||||
|
@ -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)
|
||||
|
@ -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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user