Some string optimisation

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38518 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2015-05-22 14:28:08 +00:00
parent 8556e8e744
commit d8e9f81945
3 changed files with 249 additions and 91 deletions

View file

@ -967,9 +967,10 @@ static SEL foundIgnorableSel;
if (this->shouldProcessNamespaces)
{
NSRange r = [tag rangeOfString: @":"];
NSRange r;
NSString *p = @"";
r = [tag rangeOfString: @":" options: NSLiteralSearch];
if (r.length > 0)
{
p = [tag substringToIndex: r.location];
@ -1354,9 +1355,10 @@ NSLog(@"_processTag <%@%@ %@>", flag?@"/": @"", tag, attributes);
qualified = tag;
if (this->shouldProcessNamespaces)
{
NSRange r = [tag rangeOfString: @":"];
NSRange r;
NSString *p = @"";
r = [tag rangeOfString: @":" options: NSLiteralSearch];
if (r.length > 0)
{
p = [tag substringToIndex: r.location];