From 4465e2c46bbed438377dc4a99df333bd5c058d5e Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 30 Jan 2014 20:29:48 +0100 Subject: db: add compile-time option to disable database --- src/Stats.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/Stats.cxx') 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 } -- cgit v1.2.3