From fd9ca0a9b693237b249447414fe32f618c36469d Mon Sep 17 00:00:00 2001 From: Guenter Obiltschnig Date: Thu, 1 Sep 2016 11:51:16 +0200 Subject: [PATCH] style fixes --- Data/SQLite/include/Poco/Data/SQLite/Utility.h | 11 +++++------ Data/SQLite/src/Utility.cpp | 7 +++---- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/Data/SQLite/include/Poco/Data/SQLite/Utility.h b/Data/SQLite/include/Poco/Data/SQLite/Utility.h index 9c1c867b1..06f204886 100644 --- a/Data/SQLite/include/Poco/Data/SQLite/Utility.h +++ b/Data/SQLite/include/Poco/Data/SQLite/Utility.h @@ -57,13 +57,12 @@ public: static const int OPERATION_UPDATE; static void addColumnType(std::string sqliteType, MetaColumn::ColumnDataType pocoType); - /// Adds or replaces the mapping for SQLite column type \p sqliteType - /// to a Poco type \p pocoType + /// Adds or replaces the mapping for SQLite column type sqliteType + /// to a Poco type pocoType. /// - /// \p sqliteType is a case-insensitive desription of the column type with - /// any value \p pocoType value but MetaColumn::FDT_UNKNOWN. A - /// Poco::Data::NotSupportedException is thrown if \p pocoType is invalid. - + /// sqliteType is a case-insensitive desription of the column type with + /// any value pocoType value but MetaColumn::FDT_UNKNOWN. + /// A Poco::Data::NotSupportedException is thrown if pocoType is invalid. static sqlite3* dbHandle(const Session& session); /// Returns native DB handle. diff --git a/Data/SQLite/src/Utility.cpp b/Data/SQLite/src/Utility.cpp index 04761636d..e4cc1da41 100644 --- a/Data/SQLite/src/Utility.cpp +++ b/Data/SQLite/src/Utility.cpp @@ -66,6 +66,7 @@ Utility::Utility() initializeDefaultTypes(); } + void Utility::initializeDefaultTypes() { if (_types.empty()) @@ -167,12 +168,10 @@ MetaColumn::ColumnDataType Utility::getColumnType(sqlite3_stmt* pStmt, std::size sqliteType = sqliteType.substr(0, sqliteType.find_first_of(" (")); TypeMap::const_iterator it = _types.find(Poco::trimInPlace(sqliteType)); - if (_types.end() == it) { + if (_types.end() == it) return MetaColumn::FDT_BLOB; - } - else { + else return it->second; - } }