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.

This commit is contained in:
Siteshwar Vashisht
2012-02-18 22:41:22 +05:30
parent c0ed169fdc
commit c9f4e91df8
9 changed files with 51 additions and 51 deletions

View File

@@ -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 )