aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-02 19:19:40 +0100
committerMax Kellermann <max@duempel.org>2013-01-02 19:19:58 +0100
commit83c7e1e129b1250bc73bf75e9378dfbe242b09c7 (patch)
treeecdd51df92a8b028e418a0375bd48fbd43d88a84 /src
parenta6371e2e664e4bc1ff78d881cfd2c9b5fa3909e8 (diff)
downloadmpd-83c7e1e129b1250bc73bf75e9378dfbe242b09c7.tar.gz
mpd-83c7e1e129b1250bc73bf75e9378dfbe242b09c7.tar.xz
mpd-83c7e1e129b1250bc73bf75e9378dfbe242b09c7.zip
configure.ac: disable C++ RTTI
RTTI adds overhead to the binary, and we don't need that.
Diffstat (limited to 'src')
-rw-r--r--src/DatabaseGlue.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/DatabaseGlue.cxx b/src/DatabaseGlue.cxx
index b980ded83..03a717cb2 100644
--- a/src/DatabaseGlue.cxx
+++ b/src/DatabaseGlue.cxx
@@ -49,6 +49,7 @@ extern "C" {
static Database *db;
static bool db_is_open;
+static bool is_simple;
bool
db_init(const struct config_param *param, GError **error_r)
@@ -58,6 +59,8 @@ db_init(const struct config_param *param, GError **error_r)
const char *plugin_name =
config_get_block_string(param, "plugin", "simple");
+ is_simple = strcmp(plugin_name, "simple") == 0;
+
const DatabasePlugin *plugin = GetDatabasePluginByName(plugin_name);
if (plugin == NULL) {
g_set_error(error_r, db_quark(), 0,
@@ -104,7 +107,7 @@ db_is_simple(void)
{
assert(db == NULL || db_is_open);
- return dynamic_cast<SimpleDatabase *>(db) != nullptr;
+ return is_simple;
}
struct directory *