chore(Poco): Resolve a lot of warnings, reported by g++ 13.

This commit is contained in:
Matej Kenda
2024-10-10 09:11:15 +02:00
parent 88c4958032
commit c038b52f36
13 changed files with 58 additions and 56 deletions

View File

@@ -47,6 +47,9 @@ public:
virtual ~Array();
/// Destroys the Array.
Array& operator=(const Array&) = default;
Array& operator=(Array&&) = default;
template<typename T>
Array& operator<<(const T& arg)
/// Adds the argument to the array.
@@ -126,7 +129,7 @@ public:
RedisType::Ptr element = _elements.value().at(pos);
if ( RedisTypeTraits<T>::TypeId == element->type() )
{
Type<T>* concrete = dynamic_cast<Type<T>* >(element.get());
auto* concrete = dynamic_cast<Type<T>* >(element.get());
if ( concrete != NULL ) return concrete->value();
}
throw BadCastException();
@@ -296,7 +299,7 @@ struct RedisTypeTraits<Array>
{
value.clear();
Int64 length = NumberParser::parse64(input.getline());
const Int64 length = NumberParser::parse64(input.getline());
if ( length != -1 )
{
@@ -316,7 +319,8 @@ struct RedisTypeTraits<Array>
};
} } // namespace Poco::Redis
} // namespace Redis
} // namespace Poco
#endif // Redis_Array_INCLUDED

View File

@@ -57,9 +57,12 @@ public:
Command(const Command& copy);
/// Creates a command by copying another one.
virtual ~Command();
~Command() override;
/// Destroys the command.
Command& operator=(const Command&) = default;
Command& operator=(Command&&) = default;
static Command append(const std::string& key, const std::string& value);
/// Creates and returns an APPEND command.
@@ -282,7 +285,8 @@ public:
};
} } // namespace Poco::Redis
} // namespace Redis
} // namespace Poco
#endif // Redis_Command_INCLUDED