X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=flower%2Ffile-path.cc;h=09e9c4a2fae2d5b2e6119d2072b0f4ad7a4ecf33;hb=47db9a3883d726ca53e2133a3b2298f78dd6a32e;hp=d0dd3a1f990afd846dc1dc73ed0a06485aa80024;hpb=08560a1b8076630c4fc6cb9b902614d8b74fd6fc;p=lilypond.git diff --git a/flower/file-path.cc b/flower/file-path.cc index d0dd3a1f99..09e9c4a2fa 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--2012 Han-Wen Nienhuys + Copyright (C) 1997--2015 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); }