aboutsummaryrefslogtreecommitdiffhomepage
path: root/highlight.cpp
diff options
context:
space:
mode:
authorGravatar Siteshwar Vashisht <siteshwar@gmail.com>2012-02-18 22:41:22 +0530
committerGravatar Siteshwar Vashisht <siteshwar@gmail.com>2012-02-18 22:41:22 +0530
commitc9f4e91df88112ea4ff5f5d9a993c3655672ce93 (patch)
tree2614e98acaea7c8e912208850e9f814aa92cb49a /highlight.cpp
parentc0ed169fdcd153cc54e4aa392775aa4233786ed1 (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.cpp8
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 )