From f8f4772ff2fd9bd24918f99f5a00c6b7eb038566 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= Date: Fri, 9 Oct 2015 00:38:54 +0200 Subject: [PATCH] Cache: Remove useless std::string -> const char* -> std::string conversions --- src/database/Cache.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/database/Cache.h b/src/database/Cache.h index 43595237..7d428bf7 100644 --- a/src/database/Cache.h +++ b/src/database/Cache.h @@ -61,7 +61,7 @@ class Cache return it->second; static const std::string req = "SELECT * FROM " + TABLEPOLICY::Name + " WHERE " + TABLEPOLICY::CacheColumn + " = ?"; - auto res = sqlite::Tools::fetchOne( dbConnection, req.c_str(), key ); + auto res = sqlite::Tools::fetchOne( dbConnection, req, key ); if ( res == nullptr ) return nullptr; Store[key] = res; @@ -81,7 +81,7 @@ class Cache static std::vector> fetchAll( DBConnection dbConnection ) { static const std::string req = "SELECT * FROM " + TABLEPOLICY::Name; - return sqlite::Tools::fetchAll( dbConnection, req.c_str() ); + return sqlite::Tools::fetchAll( dbConnection, req ); } template @@ -111,7 +111,7 @@ class Cache Store.erase( it ); static const std::string req = "DELETE FROM " + TABLEPOLICY::Name + " WHERE " + TABLEPOLICY::CacheColumn + " = ?"; - return sqlite::Tools::executeDelete( dbConnection, req.c_str(), key ); + return sqlite::Tools::executeDelete( dbConnection, req, key ); } static bool destroy( DBConnection dbConnection, const std::shared_ptr& self ) -- GitLab