Avoided modifying a constant string
This commit is contained in:
parent
5894e44ac2
commit
acbd505cfe
|
@ -45,12 +45,8 @@ void XMLCALL XslLocator::processingInstructionHandler (
|
||||||
if ( strcmp ( target, "xml-stylesheet" ) )
|
if ( strcmp ( target, "xml-stylesheet" ) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
char *value, *iterator;
|
const char *value, *iterator;
|
||||||
#ifdef __WXMSW__
|
|
||||||
value = strstr ( ( const char * ) data, "href=" );
|
value = strstr ( ( const char * ) data, "href=" );
|
||||||
#else
|
|
||||||
value = ( char *) strstr ( data, "href=" );
|
|
||||||
#endif
|
|
||||||
if ( !value || strlen ( value ) < 7 )
|
if ( !value || strlen ( value ) < 7 )
|
||||||
return;
|
return;
|
||||||
value += 6;
|
value += 6;
|
||||||
|
@ -63,7 +59,7 @@ void XMLCALL XslLocator::processingInstructionHandler (
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
d->xslLocation = std::string ( value, iterator - value );
|
d->xslLocation.assign( value, iterator - value );
|
||||||
XML_StopParser ( d->parser, false );
|
XML_StopParser ( d->parser, false );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue