summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2018-04-11 00:45:29 +0200
committerlouiz’ <louiz@louiz.org>2018-04-11 00:45:29 +0200
commitde8267fa3f4f4e1d61bcf35fb36c6664f520a385 (patch)
tree6245bbda5f51279133f476da5ca2c51d5f86d050
parent857c7d3972a03cbeebf730d99b924d3710dee6a0 (diff)
downloadbiboumi-de8267fa3f4f4e1d61bcf35fb36c6664f520a385.tar.gz
biboumi-de8267fa3f4f4e1d61bcf35fb36c6664f520a385.tar.bz2
biboumi-de8267fa3f4f4e1d61bcf35fb36c6664f520a385.tar.xz
biboumi-de8267fa3f4f4e1d61bcf35fb36c6664f520a385.zip
Fix a build warning when compiling without postgres or sqlite
-rw-r--r--src/database/postgresql_engine.hpp3
-rw-r--r--src/database/sqlite3_engine.hpp3
2 files changed, 6 insertions, 0 deletions
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<DatabaseEngine> 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<DatabaseEngine> open(const std::string& string)
{
throw std::runtime_error("Cannot open sqlite3 database "s + string + ": biboumi is not compiled with sqlite3 lib.");
+ return {};
}
};