From c064e8d62f0d2b46159570f21708c2546970718d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 22 Nov 2013 00:35:29 +0100 Subject: DatabasePlugin: add method GetUpdateStamp() Refactor SimpleDatabase::GetLastModified() to be generic for all plugins. Remove the SimpleDatabase assumption from db_stats_print(), allowing it to be implemented by all database plugins. --- src/DatabaseSimple.hxx | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'src/DatabaseSimple.hxx') diff --git a/src/DatabaseSimple.hxx b/src/DatabaseSimple.hxx index 124d78a30..6d52ac0b3 100644 --- a/src/DatabaseSimple.hxx +++ b/src/DatabaseSimple.hxx @@ -62,25 +62,13 @@ db_get_directory(const char *name); bool db_save(Error &error); -/** - * May only be used if db_is_simple() returns true. - */ -gcc_pure -time_t -db_get_mtime(void); - /** * Returns true if there is a valid database file on the disk. * * May only be used if db_is_simple() returns true. */ gcc_pure -static inline bool -db_exists(void) -{ - /* mtime is set only if the database file was loaded or saved - successfully */ - return db_get_mtime() > 0; -} +bool +db_exists(); #endif -- cgit v1.2.3