diff options
author | Siteshwar Vashisht <siteshwar@gmail.com> | 2012-02-18 22:41:22 +0530 |
---|---|---|
committer | Siteshwar Vashisht <siteshwar@gmail.com> | 2012-02-18 22:41:22 +0530 |
commit | c9f4e91df88112ea4ff5f5d9a993c3655672ce93 (patch) | |
tree | 2614e98acaea7c8e912208850e9f814aa92cb49a /highlight.cpp | |
parent | c0ed169fdcd153cc54e4aa392775aa4233786ed1 (diff) |
Modified most functions in wutil.h/.cpp to use wcstring instead of wchar_t*, removing calls to c_str() while calling these functions in other files.
Diffstat (limited to 'highlight.cpp')
-rw-r--r-- | highlight.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/highlight.cpp b/highlight.cpp index 059ccbfe..1f34cd4c 100644 --- a/highlight.cpp +++ b/highlight.cpp @@ -128,7 +128,7 @@ static bool is_potential_path( const wcstring &cpath ) must_be_dir = cleaned_path[cleaned_path.length()-1] == L'/'; if( must_be_dir ) { - dir = wopendir( cleaned_path.c_str() ); + dir = wopendir( cleaned_path ); res = !!dir; if( dir ) { @@ -144,12 +144,12 @@ static bool is_potential_path( const wcstring &cpath ) { res = true; } - else if( (dir = wopendir( dir_name.c_str() )) ) + else if( (dir = wopendir( dir_name)) ) { wcstring ent; while (wreaddir(dir, ent)) { - if( wcsncmp( ent.c_str(), base_name.c_str(), base_name.length() ) == 0 ) + if( ent == base_name ) { res = true; break; @@ -802,7 +802,7 @@ static void tokenize( const wchar_t * const buff, int * const color, const int p if( slash_idx != wcstring::npos ) { dir.resize(slash_idx); - if( wstat( dir.c_str(), &buff ) == -1 ) + if( wstat( dir, &buff ) == -1 ) { color[ tok_get_pos( &tok ) ] = HIGHLIGHT_ERROR; if( error ) |