Fix a build warning when compiling without postgres or sqlite
This commit is contained in:
@@ -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:
|
|||||||
|
|
||||||
#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 {};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user