From a37ea80991a15c4585862b0d890ed9622720129e Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sat, 19 Jan 2013 19:20:25 +0100 Subject: Use const ref on generics to please ##c++ people. --- AudioFile.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/AudioFile.cpp b/AudioFile.cpp index db782ec..afb72b5 100644 --- a/AudioFile.cpp +++ b/AudioFile.cpp @@ -18,7 +18,7 @@ /* Turn a string into an integer type for any map class. */ template -inline T extractTag(M &map, const char *key) +inline T extractTag(const M &map, const char *key) { T ret = 0; std::istringstream stream(extractTag(map, key)); @@ -28,7 +28,7 @@ inline T extractTag(M &map, const char *key) /* Turn a string into a pair of integer types separated by a slash * for any map class. */ template -inline std::pair extractTag(M &map, const char *key) +inline std::pair extractTag(const M &map, const char *key) { std::pair values; values.first = 0; @@ -42,7 +42,7 @@ inline std::pair extractTag(M &map, const char *key) } /* Turn a string into a bool, based on "1" and "true", for any map class. */ template -inline bool extractTag(M &map, const char *key) +inline bool extractTag(const M &map, const char *key) { std::string str(extractTag(map, key)); std::transform(str.begin(), str.end(), str.begin(), ::tolower); -- cgit v1.2.3-59-g8ed1b