From c8af3f1c92b1c0e101bc5ca5e3ca1e66a4b448bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnter=20Obiltschnig?= Date: Fri, 31 Aug 2018 10:16:37 +0200 Subject: [PATCH] fixed unused warnings --- Data/include/Poco/Data/AbstractExtraction.h | 16 +-- Data/include/Poco/Data/Extraction.h | 120 ++++++++++---------- 2 files changed, 68 insertions(+), 68 deletions(-) diff --git a/Data/include/Poco/Data/AbstractExtraction.h b/Data/include/Poco/Data/AbstractExtraction.h index 8960d7444..2da6d3c6f 100644 --- a/Data/include/Poco/Data/AbstractExtraction.h +++ b/Data/include/Poco/Data/AbstractExtraction.h @@ -49,7 +49,7 @@ public: AbstractExtraction(Poco::UInt32 limit = Limit::LIMIT_UNLIMITED, Poco::UInt32 position = 0, bool bulk = false); - /// Creates the AbstractExtraction. A limit value equal to EXTRACT_UNLIMITED (0xffffffffu) + /// Creates the AbstractExtraction. A limit value equal to EXTRACT_UNLIMITED (0xffffffffu) /// means that we extract as much data as possible during one execute. /// Otherwise the limit value is used to partition data extracting to a limited amount of rows. @@ -74,7 +74,7 @@ public: virtual std::size_t numOfRowsHandled() const = 0; /// Returns the number of rows that the extraction handles. /// - /// The trivial case will be one single row but + /// The trivial case will be one single row but /// for collection data types (ie vector) it can be larger. virtual std::size_t numOfRowsAllowed() const = 0; @@ -102,8 +102,8 @@ public: /// Gets the limit. virtual bool isNull(std::size_t row) const; - /// In implementations, this function returns true if value at row is null, - /// false otherwise. + /// In implementations, this function returns true if value at row is null, + /// false otherwise. /// Normal behavior is to replace nulls with default values. /// However, extraction implementations may remember the underlying database /// null values and be able to later provide information about them. @@ -125,7 +125,7 @@ public: /// Returns the force empty string flag. template - bool isValueNull(const T& str, bool deflt) + bool isValueNull(const T& /*str*/, bool deflt) /// Utility function to determine the nullness of the value. /// This generic version always returns default value /// (i.e. does nothing). The std::string overload does @@ -140,7 +140,7 @@ public: /// /// Returns true when folowing conditions are met: /// - /// - string is empty + /// - string is empty /// - getEmptyStringIsNull() returns true bool isValueNull(const Poco::UTF16String& str, bool deflt); @@ -148,7 +148,7 @@ public: /// /// Returns true when folowing conditions are met: /// - /// - string is empty + /// - string is empty /// - getEmptyStringIsNull() returns true private: @@ -207,7 +207,7 @@ inline Poco::UInt32 AbstractExtraction::getLimit() const } -inline bool AbstractExtraction::isNull(std::size_t row) const +inline bool AbstractExtraction::isNull(std::size_t /*row*/) const { throw NotImplementedException("Check for null values not implemented."); } diff --git a/Data/include/Poco/Data/Extraction.h b/Data/include/Poco/Data/Extraction.h index 7b98700e9..45821357c 100644 --- a/Data/include/Poco/Data/Extraction.h +++ b/Data/include/Poco/Data/Extraction.h @@ -49,8 +49,8 @@ public: Extraction(T& result, const Position& pos = Position(0)): AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()), - _rResult(result), - _default(), + _rResult(result), + _default(), _extracted(false), _null(false) /// Creates an Extraction object at specified position. @@ -58,10 +58,10 @@ public: { } - Extraction(T& result, const T& def, const Position& pos = Position(0)): + Extraction(T& result, const T& def, const Position& pos = Position(0)): AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()), - _rResult(result), - _default(def), + _rResult(result), + _default(def), _extracted(false), _null(false) /// Creates an Extraction object at specified position. @@ -89,7 +89,7 @@ public: return 1u; } - bool isNull(std::size_t row = 0) const + bool isNull(std::size_t /*row*/ = 0) const { return _null; } @@ -101,7 +101,7 @@ public: AbstractExtractor::Ptr pExt = getExtractor(); TypeHandler::extract(pos, _rResult, _default, pExt); _null = isValueNull(_rResult, pExt->isNull(pos)); - + return 1u; } @@ -133,23 +133,23 @@ class Extraction >: public AbstractExtraction /// Vector Data Type specialization for extraction of values from a query result set. { public: - + typedef std::vector ValType; typedef SharedPtr ValPtr; typedef Extraction Type; typedef SharedPtr Ptr; - Extraction(std::vector& result, const Position& pos = Position(0)): + Extraction(std::vector& result, const Position& pos = Position(0)): AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()), - _rResult(result), + _rResult(result), _default() { _rResult.clear(); } - Extraction(std::vector& result, const T& def, const Position& pos = Position(0)): + Extraction(std::vector& result, const T& def, const Position& pos = Position(0)): AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()), - _rResult(result), + _rResult(result), _default(def) { _rResult.clear(); @@ -181,8 +181,8 @@ public: return _nulls.at(row); } catch (std::out_of_range& ex) - { - throw RangeException(ex.what()); + { + throw RangeException(ex.what()); } } @@ -229,17 +229,17 @@ public: typedef Extraction Type; typedef SharedPtr Ptr; - Extraction(std::vector& result, const Position& pos = Position(0)): + Extraction(std::vector& result, const Position& pos = Position(0)): AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()), - _rResult(result), + _rResult(result), _default() { _rResult.clear(); } - Extraction(std::vector& result, const bool& def, const Position& pos = Position(0)): + Extraction(std::vector& result, const bool& def, const Position& pos = Position(0)): AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()), - _rResult(result), + _rResult(result), _default(def) { _rResult.clear(); @@ -271,8 +271,8 @@ public: return _nulls.at(row); } catch (std::out_of_range& ex) - { - throw RangeException(ex.what()); + { + throw RangeException(ex.what()); } } @@ -321,17 +321,17 @@ public: typedef Extraction Type; typedef SharedPtr Ptr; - Extraction(std::list& result, const Position& pos = Position(0)): + Extraction(std::list& result, const Position& pos = Position(0)): AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()), - _rResult(result), + _rResult(result), _default() { _rResult.clear(); } - Extraction(std::list& result, const T& def, const Position& pos = Position(0)): + Extraction(std::list& result, const T& def, const Position& pos = Position(0)): AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()), - _rResult(result), + _rResult(result), _default(def) { _rResult.clear(); @@ -363,8 +363,8 @@ public: return _nulls.at(row); } catch (std::out_of_range& ex) - { - throw RangeException(ex.what()); + { + throw RangeException(ex.what()); } } @@ -411,17 +411,17 @@ public: typedef Extraction Type; typedef SharedPtr Ptr; - Extraction(std::deque& result, const Position& pos = Position(0)): + Extraction(std::deque& result, const Position& pos = Position(0)): AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()), - _rResult(result), + _rResult(result), _default() { _rResult.clear(); } - Extraction(std::deque& result, const T& def, const Position& pos = Position(0)): + Extraction(std::deque& result, const T& def, const Position& pos = Position(0)): AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()), - _rResult(result), + _rResult(result), _default(def) { _rResult.clear(); @@ -453,8 +453,8 @@ public: return _nulls.at(row); } catch (std::out_of_range& ex) - { - throw RangeException(ex.what()); + { + throw RangeException(ex.what()); } } @@ -495,7 +495,7 @@ template class InternalExtraction: public Extraction /// Container Data Type specialization extension for extraction of values from a query result set. /// - /// This class is intended for PocoData internal use - it is used by StatementImpl + /// This class is intended for PocoData internal use - it is used by StatementImpl /// to automaticaly create internal Extraction in cases when statement returns data and no external storage /// was supplied. It is later used by RecordSet to retrieve the fetched data after statement execution. /// It takes ownership of the Column pointer supplied as constructor argument. Column object, in turn @@ -510,8 +510,8 @@ public: typedef SharedPtr Ptr; - InternalExtraction(C& result, Column* pColumn, const Position& pos = Position(0)): - Extraction(result, ValType(), pos), + InternalExtraction(C& result, Column* pColumn, const Position& pos = Position(0)): + Extraction(result, ValType(), pos), _pColumn(pColumn) /// Creates InternalExtraction. { @@ -527,17 +527,17 @@ public: { Extraction::reset(); _pColumn->reset(); - } + } const ValType& value(int index) const { try - { - return Extraction::result().at(index); + { + return Extraction::result().at(index); } catch (std::out_of_range& ex) - { - throw RangeException(ex.what()); + { + throw RangeException(ex.what()); } } @@ -571,17 +571,17 @@ public: typedef SharedPtr Ptr; typedef typename ValType::iterator Iterator; - Extraction(std::set& result, const Position& pos = Position(0)): + Extraction(std::set& result, const Position& pos = Position(0)): AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()), - _rResult(result), + _rResult(result), _default() { _rResult.clear(); } - Extraction(std::set& result, const T& def, const Position& pos = Position(0)): + Extraction(std::set& result, const T& def, const Position& pos = Position(0)): AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()), - _rResult(result), + _rResult(result), _default(def) { _rResult.clear(); @@ -635,17 +635,17 @@ public: typedef Extraction Type; typedef SharedPtr Ptr; - Extraction(std::multiset& result, const Position& pos = Position(0)): + Extraction(std::multiset& result, const Position& pos = Position(0)): AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()), - _rResult(result), + _rResult(result), _default() { _rResult.clear(); } - Extraction(std::multiset& result, const T& def, const Position& pos = Position(0)): + Extraction(std::multiset& result, const T& def, const Position& pos = Position(0)): AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()), - _rResult(result), + _rResult(result), _default(def) { _rResult.clear(); @@ -699,17 +699,17 @@ public: typedef Extraction Type; typedef SharedPtr Ptr; - Extraction(std::map& result, const Position& pos = Position(0)): + Extraction(std::map& result, const Position& pos = Position(0)): AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()), - _rResult(result), + _rResult(result), _default() { _rResult.clear(); } - Extraction(std::map& result, const V& def, const Position& pos = Position(0)): + Extraction(std::map& result, const V& def, const Position& pos = Position(0)): AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()), - _rResult(result), + _rResult(result), _default(def) { _rResult.clear(); @@ -763,17 +763,17 @@ public: typedef Extraction Type; typedef SharedPtr Ptr; - Extraction(std::multimap& result, const Position& pos = Position(0)): + Extraction(std::multimap& result, const Position& pos = Position(0)): AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()), - _rResult(result), + _rResult(result), _default() { _rResult.clear(); } - Extraction(std::multimap& result, const V& def, const Position& pos = Position(0)): + Extraction(std::multimap& result, const V& def, const Position& pos = Position(0)): AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()), - _rResult(result), + _rResult(result), _default(def) { _rResult.clear(); @@ -820,7 +820,7 @@ private: namespace Keywords { -template +template inline AbstractExtraction::Ptr into(T& t) /// Convenience function to allow for a more compact creation of an extraction object. { @@ -828,7 +828,7 @@ inline AbstractExtraction::Ptr into(T& t) } -template +template inline AbstractExtraction::Ptr into(T& t, const Position& pos) /// Convenience function to allow for a more compact creation of an extraction object /// with multiple recordset support. @@ -837,9 +837,9 @@ inline AbstractExtraction::Ptr into(T& t, const Position& pos) } -template +template inline AbstractExtraction::Ptr into(T& t, const Position& pos, const T& def) - /// Convenience function to allow for a more compact creation of an extraction object + /// Convenience function to allow for a more compact creation of an extraction object /// with multiple recordset support and the given default { return new Extraction(t, def, pos);