X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=flower%2Ffile-path.cc;h=660895a1f58bf6703c44b132257887ddac1bc077;hb=d7b067b15ae975ee52f91bd674cc667baa09eb04;hp=850592bd36280cb622f1b3fde6f12ee2f90f37a7;hpb=f93e4199873c91ae32f0e84a610d14853dc379df;p=lilypond.git diff --git a/flower/file-path.cc b/flower/file-path.cc index 850592bd36..660895a1f5 100644 --- a/flower/file-path.cc +++ b/flower/file-path.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 1997--2011 Han-Wen Nienhuys + Copyright (C) 1997--2014 Han-Wen Nienhuys Jan Nieuwenhuizen LilyPond is free software: you can redistribute it and/or modify @@ -47,13 +47,13 @@ File_path::directories () const #include void -File_path::parse_path (string p) +File_path::parse_path (const string &p) { concat (dirs_, string_split (p, PATHSEP)); } bool -is_file (string file_name) +is_file (const string &file_name) { #if !STAT_MACROS_BROKEN struct stat sbuf; @@ -106,7 +106,7 @@ directory, in this order. The file name if found, or empty string if not found. */ string -File_path::find (string name) const +File_path::find (const string &name) const { if (!name.length () || (name == "-")) return name; @@ -146,7 +146,7 @@ File_path::find (string name) const where EXT is from EXTENSIONS. */ string -File_path::find (string name, char const *extensions[]) +File_path::find (const string &name, char const *extensions[]) { if (name.empty () || name == "-") return name; @@ -195,13 +195,13 @@ File_path::to_string () const } void -File_path::append (string str) +File_path::append (const string &str) { dirs_.push_back (str); } void -File_path::prepend (string str) +File_path::prepend (const string &str) { dirs_.insert (dirs_.begin (), str); }