Author: aschnell Date: Wed Mar 25 20:00:06 2009 New Revision: 56403 URL: http://svn.opensuse.org/viewcvs/yast?rev=56403&view=rev Log: - take 'const string&' instead of 'string' Modified: trunk/storage/libstorage/src/AppUtil.cc trunk/storage/libstorage/src/AppUtil.h Modified: trunk/storage/libstorage/src/AppUtil.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/AppUtil.cc?rev=56403&r1=56402&r2=56403&view=diff ============================================================================== --- trunk/storage/libstorage/src/AppUtil.cc (original) +++ trunk/storage/libstorage/src/AppUtil.cc Wed Mar 25 20:00:06 2009 @@ -42,23 +42,20 @@ } -void createPath(string Path_Cv) +void createPath(const string& Path_Cv) { - string Path_Ci = Path_Cv; - string Tmp_Ci; - string::size_type Pos_ii = 0; - while ((Pos_ii = Path_Ci.find('/', Pos_ii + 1)) != string::npos) + while ((Pos_ii = Path_Cv.find('/', Pos_ii + 1)) != string::npos) { - Tmp_Ci = Path_Ci.substr(0, Pos_ii); + string Tmp_Ci = Path_Cv.substr(0, Pos_ii); mkdir(Tmp_Ci.c_str(), 0777); } - mkdir(Path_Ci.c_str(), 0777); + mkdir(Path_Cv.c_str(), 0777); } bool -checkDir(string Path_Cv) +checkDir(const string& Path_Cv) { struct stat Stat_ri; @@ -68,7 +65,7 @@ bool -checkNormalFile(string Path_Cv) +checkNormalFile(const string& Path_Cv) { struct stat Stat_ri; Modified: trunk/storage/libstorage/src/AppUtil.h URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/AppUtil.h?rev=56403&r1=56402&r2=56403&view=diff ============================================================================== --- trunk/storage/libstorage/src/AppUtil.h (original) +++ trunk/storage/libstorage/src/AppUtil.h Wed Mar 25 20:00:06 2009 @@ -13,9 +13,10 @@ { using std::string; -void createPath(string Path_Cv); -bool checkNormalFile(string Path_Cv); -bool checkDir(string Path_Cv); + +void createPath(const string& Path_Cv); +bool checkNormalFile(const string& Path_Cv); +bool checkDir(const string& Path_Cv); string dupDash(const string& s); string extractNthWord(int Num_iv, const string& Line_Cv, bool GetRest_bi = false); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org