aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-20 13:46:13 +0200
committerMax Kellermann <max@duempel.org>2013-10-20 13:46:13 +0200
commit1defb38a6f6ced41bb2ec8807a95e064b24d4688 (patch)
tree9a9e8fcd1b52e860bd11db17ceb74e8328ebbee1 /src
parent56bc9e12ee16e3cbf20753c7fab0188a34e7d9ee (diff)
downloadmpd-1defb38a6f6ced41bb2ec8807a95e064b24d4688.tar.gz
mpd-1defb38a6f6ced41bb2ec8807a95e064b24d4688.tar.xz
mpd-1defb38a6f6ced41bb2ec8807a95e064b24d4688.zip
DatabaseSave: convert anonymous enum to constexpr
Diffstat (limited to 'src')
-rw-r--r--src/DatabaseSave.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/DatabaseSave.cxx b/src/DatabaseSave.cxx
index 0b6338013..3153766a8 100644
--- a/src/DatabaseSave.cxx
+++ b/src/DatabaseSave.cxx
@@ -44,9 +44,7 @@
#define DIRECTORY_FS_CHARSET "fs_charset: "
#define DB_TAG_PREFIX "tag: "
-enum {
- DB_FORMAT = 1,
-};
+static constexpr unsigned DB_FORMAT = 1;
void
db_save_internal(FILE *fp, const Directory &music_root)
@@ -69,7 +67,7 @@ bool
db_load_internal(TextFile &file, Directory &music_root, Error &error)
{
char *line;
- int format = 0;
+ unsigned format = 0;
bool found_charset = false, found_version = false;
bool success;
bool tags[TAG_NUM_OF_ITEM_TYPES];