Fix a build warning when compiling without postgres or sqlite

This commit is contained in:
louiz’
2018-04-11 00:45:29 +02:00
parent 857c7d3972
commit de8267fa3f
2 changed files with 6 additions and 0 deletions
+3
View File
@@ -45,12 +45,15 @@ private:
#else #else
using namespace std::string_literals;
class PostgresqlEngine class PostgresqlEngine
{ {
public: public:
static std::unique_ptr<DatabaseEngine> open(const std::string& string) 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."); throw std::runtime_error("Cannot open postgresql database "s + string + ": biboumi is not compiled with libpq.");
return {};
} }
}; };
+3
View File
@@ -42,12 +42,15 @@ private:
#else #else
using namespace std::string_literals;
class Sqlite3Engine class Sqlite3Engine
{ {
public: public:
static std::unique_ptr<DatabaseEngine> open(const std::string& string) 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."); throw std::runtime_error("Cannot open sqlite3 database "s + string + ": biboumi is not compiled with sqlite3 lib.");
return {};
} }
}; };