aboutsummaryrefslogtreecommitdiffstats
path: root/src/db/SimpleDatabasePlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-01-19 11:23:02 +0100
committerMax Kellermann <max@duempel.org>2014-01-19 11:23:02 +0100
commitba372197fbda68d72857585008061ca5f781f805 (patch)
treef022ca7204ccc6156af2613bf0f57bd55c91aa97 /src/db/SimpleDatabasePlugin.cxx
parentbde27ccec3468efb3bc669b980e8850cb5150e15 (diff)
downloadmpd-ba372197fbda68d72857585008061ca5f781f805.tar.gz
mpd-ba372197fbda68d72857585008061ca5f781f805.tar.xz
mpd-ba372197fbda68d72857585008061ca5f781f805.zip
db/simple: make borrowed_song_count "mutable"
Simpler to use than const_cast.
Diffstat (limited to '')
-rw-r--r--src/db/SimpleDatabasePlugin.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/db/SimpleDatabasePlugin.cxx b/src/db/SimpleDatabasePlugin.cxx
index 9b17ada29..c33db3831 100644
--- a/src/db/SimpleDatabasePlugin.cxx
+++ b/src/db/SimpleDatabasePlugin.cxx
@@ -206,7 +206,7 @@ SimpleDatabase::GetSong(const char *uri, Error &error) const
"No such song: %s", uri);
#ifndef NDEBUG
else
- ++const_cast<unsigned &>(borrowed_song_count);
+ ++borrowed_song_count;
#endif
return song;
@@ -219,7 +219,7 @@ SimpleDatabase::ReturnSong(gcc_unused Song *song) const
#ifndef NDEBUG
assert(borrowed_song_count > 0);
- --const_cast<unsigned &>(borrowed_song_count);
+ --borrowed_song_count;
#endif
}