Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions vstring_internal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@
{
if( fr > to ) return;
target.resize( target.box->sl + ( to - fr ) + 1 );
for( int i = fr; i <= to; i++ )
for( VS_CHAR i = fr; i <= to; i++ )
target.box->s[target.box->sl++] = i;
target.box->s[target.box->sl] = 0;
}
Expand Down Expand Up @@ -838,7 +838,7 @@
{
if( fr > to ) return;
int sl = str_len( target );
for( int i = fr; i < to; i++ )
for( VS_CHAR i = fr; i < to; i++ )
target[sl++] = i;
target[sl] = 0;
}
Expand Down Expand Up @@ -1027,11 +1027,11 @@
rc = target[pos];
pos++;
}
else if ( rc != -1 && target[pos] == rc )
else if ( rc != -1 && (int)target[pos] == rc )
{
str_del( target, pos, 1 );
}
else if ( rc != -1 && target[pos] != rc )
else if ( rc != -1 && (int)target[pos] != rc )
{
rc = -1;
}
Expand Down Expand Up @@ -1985,7 +1985,7 @@
VS_CHAR* str_fix_path( VS_CHAR* s, int slashtype )
{
size_t sl = str_len( s );
if ( s[sl-1] != slashtype )
if ( s[sl-1] != (VS_CHAR)slashtype )
{
s[sl] = slashtype;
s[sl+1] = 0;
Expand All @@ -1996,7 +1996,7 @@ VS_CHAR* str_fix_path( VS_CHAR* s, int slashtype )
const VS_STRING_CLASS& str_fix_path( VS_STRING_CLASS &s, int slashtype )
{
size_t sl = str_len( s );
if ( s[sl-1] != slashtype )
if ( s[sl-1] != (VS_CHAR)slashtype )
str_add_ch( s, slashtype );
return s;
}
Expand Down
4 changes: 2 additions & 2 deletions vstrlib_internal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ int mem_string_search( const VS_CHAR *p, const VS_CHAR* d, const VS_CHAR* opt )
void VS_CHARSET_CLASS::push( VS_CHAR n, int val )
{
if ( n < 0 ) return;
if ( n >= _size * (int)sizeof(VS_CHAR) ) resize( n + 1 );
if ( (int)n >= _size * (int)sizeof(VS_CHAR) ) resize( n + 1 );
if ( val )
_data[ n / sizeof(VS_CHAR) ] |= 1 << (n % sizeof(VS_CHAR));
else
Expand All @@ -603,7 +603,7 @@ int mem_string_search( const VS_CHAR *p, const VS_CHAR* d, const VS_CHAR* opt )

int VS_CHARSET_CLASS::in( VS_CHAR n )
{
if ( n < 0 || n >= _size * (int)sizeof(VS_CHAR) ) return 0;
if ( n < 0 || (int)n >= _size * (int)sizeof(VS_CHAR) ) return 0;
return ( _data[ n / sizeof(VS_CHAR) ] & ( 1 << ( n % sizeof(VS_CHAR) ) ) ) != 0;
}

Expand Down
Loading