mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-10 18:08:30 -04:00
desktop: fixed a warning
This commit is contained in:
parent
bcb8fb1c7f
commit
8290b61951
@ -244,7 +244,7 @@ String String::replace( char findChar, char replaceChar )
|
|||||||
return theReturn;
|
return theReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
String String::replace( const String& match, const String& replace )
|
String String::replace( const String& match, const String& rep )
|
||||||
{
|
{
|
||||||
if ( _buffer == NULL ) return *this;
|
if ( _buffer == NULL ) return *this;
|
||||||
String temp = _buffer, newString;
|
String temp = _buffer, newString;
|
||||||
@ -253,7 +253,7 @@ String String::replace( const String& match, const String& replace )
|
|||||||
while ( (loc = temp.indexOf( match )) != -1 )
|
while ( (loc = temp.indexOf( match )) != -1 )
|
||||||
{
|
{
|
||||||
newString += temp.substring( 0, loc );
|
newString += temp.substring( 0, loc );
|
||||||
newString += replace;
|
newString += rep;
|
||||||
temp = temp.substring( loc + match._length );
|
temp = temp.substring( loc + match._length );
|
||||||
}
|
}
|
||||||
newString += temp;
|
newString += temp;
|
||||||
|
Loading…
Reference in New Issue
Block a user