From de8267fa3f4f4e1d61bcf35fb36c6664f520a385 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Wed, 11 Apr 2018 00:45:29 +0200 Subject: Fix a build warning when compiling without postgres or sqlite --- src/database/postgresql_engine.hpp | 3 +++ src/database/sqlite3_engine.hpp | 3 +++ 2 files changed, 6 insertions(+) (limited to 'src') diff --git a/src/database/postgresql_engine.hpp b/src/database/postgresql_engine.hpp index f2dcec3..70215d4 100644 --- a/src/database/postgresql_engine.hpp +++ b/src/database/postgresql_engine.hpp @@ -45,12 +45,15 @@ private: #else +using namespace std::string_literals; + class PostgresqlEngine { public: static std::unique_ptr open(const std::string& string) { throw std::runtime_error("Cannot open postgresql database "s + string + ": biboumi is not compiled with libpq."); + return {}; } }; diff --git a/src/database/sqlite3_engine.hpp b/src/database/sqlite3_engine.hpp index 82d01c9..1b37e8c 100644 --- a/src/database/sqlite3_engine.hpp +++ b/src/database/sqlite3_engine.hpp @@ -42,12 +42,15 @@ private: #else +using namespace std::string_literals; + class Sqlite3Engine { public: static std::unique_ptr open(const std::string& string) { throw std::runtime_error("Cannot open sqlite3 database "s + string + ": biboumi is not compiled with sqlite3 lib."); + return {}; } }; -- cgit v1.2.3