diff options
author | Max Kellermann <max@duempel.org> | 2014-01-30 20:29:48 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-01-30 20:39:40 +0100 |
commit | 4465e2c46bbed438377dc4a99df333bd5c058d5e (patch) | |
tree | cbc1d27aad939689f44b0ac3542a6ca1777b9dc1 /src/Stats.cxx | |
parent | 34b309b99aa2f274308f19974c428e1c7ac5d66f (diff) |
db: add compile-time option to disable database
Diffstat (limited to 'src/Stats.cxx')
-rw-r--r-- | src/Stats.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Stats.cxx b/src/Stats.cxx index 940a984da..6d406a438 100644 --- a/src/Stats.cxx +++ b/src/Stats.cxx @@ -37,6 +37,8 @@ static unsigned start_time; #endif +#ifdef ENABLE_DATABASE + static DatabaseStats stats; enum class StatsValidity : uint8_t { @@ -45,6 +47,8 @@ enum class StatsValidity : uint8_t { static StatsValidity stats_validity = StatsValidity::INVALID; +#endif + void stats_global_init(void) { #ifndef WIN32 @@ -52,6 +56,8 @@ void stats_global_init(void) #endif } +#ifdef ENABLE_DATABASE + void stats_invalidate() { @@ -120,6 +126,8 @@ db_stats_print(Client &client) (unsigned long)update_stamp); } +#endif + void stats_print(Client &client) { @@ -133,6 +141,8 @@ stats_print(Client &client) #endif (unsigned long)(client.player_control.GetTotalPlayTime() + 0.5)); +#ifdef ENABLE_DATABASE if (GetDatabase() != nullptr) db_stats_print(client); +#endif } |