diff options
author | Siteshwar Vashisht <siteshwar@gmail.com> | 2012-02-19 22:55:15 +0530 |
---|---|---|
committer | Siteshwar Vashisht <siteshwar@gmail.com> | 2012-02-19 22:55:15 +0530 |
commit | 74a7303c2339eee146fd436849c61fe1bf506e30 (patch) | |
tree | 321894506b06fddbabfabfb397e535d64ca30e31 /path.cpp | |
parent | d8a99917386146f47fc178c80b1d07f9e94aa121 (diff) |
Modified functions in function.h/.cpp to use wcstring instead wchar_t*, other files also modified to use wcstring.
Diffstat (limited to 'path.cpp')
-rw-r--r-- | path.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -405,12 +405,12 @@ wchar_t *path_allocate_cdpath( const wchar_t *dir, const wchar_t *wd ) for (wcstring_list_t::const_iterator iter = paths.begin(); iter != paths.end(); iter++) { struct stat buf; - const wchar_t *dir = iter->c_str(); + const wcstring &dir = *iter; if( wstat( dir, &buf ) == 0 ) { if( S_ISDIR(buf.st_mode) ) { - res = wcsdup(dir); + res = wcsdup(dir.c_str()); break; } else @@ -534,7 +534,7 @@ bool paths_are_same_file(const wcstring &path1, const wcstring &path2) { return true; struct stat s1, s2; - if (wstat(path1.c_str(), &s1) == 0 && wstat(path2.c_str(), &s2) == 0) { + if (wstat(path1, &s1) == 0 && wstat(path2, &s2) == 0) { return s1.st_ino == s2.st_ino && s1.st_dev == s2.st_dev; } else { return false; |