Commit de8267fa authored by louiz’'s avatar louiz’

Fix a build warning when compiling without postgres or sqlite

parent 857c7d39
Pipeline #1239 passed with stages
in 18 minutes and 22 seconds
...@@ -45,12 +45,15 @@ private: ...@@ -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 {};
} }
}; };
......
...@@ -42,12 +42,15 @@ private: ...@@ -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 {};
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment