mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
Fix transmute function to be more efficient.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@8068 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
65a853d778
commit
e3c7b3fae5
1 changed files with 4 additions and 4 deletions
|
@ -1365,15 +1365,15 @@ transmute(ivars self, NSString *aString)
|
||||||
* string whose ivars we can access directly.
|
* string whose ivars we can access directly.
|
||||||
*/
|
*/
|
||||||
transmute = NO;
|
transmute = NO;
|
||||||
if ((c != GSMutableStringClass || other->_flags.wide != 1)
|
if (GSObjCIsKindOf(c, GSUnicodeStringClass) == NO
|
||||||
&& c != GSUnicodeStringClass)
|
&& (c != GSMutableStringClass || other->_flags.wide != 1))
|
||||||
{
|
{
|
||||||
other = 0;
|
other = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (c == GSCStringClass || c == NXConstantStringClass
|
if (GSObjCIsKindOf(c, GSCStringClass) || c == NXConstantStringClass
|
||||||
|| (c == GSMutableStringClass && other->_flags.wide == 0))
|
|| (c == GSMutableStringClass && other->_flags.wide == 0))
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@ -1393,7 +1393,7 @@ transmute(ivars self, NSString *aString)
|
||||||
other = 0;
|
other = 0;
|
||||||
}
|
}
|
||||||
else if ((c == GSMutableStringClass && other->_flags.wide == 1)
|
else if ((c == GSMutableStringClass && other->_flags.wide == 1)
|
||||||
|| c == GSUnicodeStringClass)
|
|| GSObjCIsKindOf(c, GSUnicodeStringClass) == YES)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* This is a C string, and the other string can not be converted
|
* This is a C string, and the other string can not be converted
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue