]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/file-name-map.cc
Issue 4550 (1/2) Avoid "using namespace std;" in included files
[lilypond.git] / lily / file-name-map.cc
index 6074f3a1da30f45790e94544b38d6b8e50e9c912..d9b9711ba139093afd040be904b75c9188ed8f0b 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 2005--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  Copyright (C) 2005--2015 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -23,13 +23,16 @@ using namespace std;
 #include "file-name-map.hh"
 #include "lily-guile.hh"
 
+using std::map;
+using std::string;
+
 map<string, string> file_name_map_global;
 
 string
-map_file_name (string s)
+map_file_name (const string &s)
 {
   if (file_name_map_global.find (s) != file_name_map_global.end ())
-    s = file_name_map_global[s];
+    return file_name_map_global[s];
   return s;
 }