mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 08:26:27 +00:00
(+initialize): Use static "done".
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@286 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d5ad853741
commit
0d4689ba36
2 changed files with 5 additions and 3 deletions
|
@ -124,8 +124,10 @@
|
|||
|
||||
+ (void) initialize
|
||||
{
|
||||
if ([self class] == [NSMutableCString class])
|
||||
static int done = 0;
|
||||
if (!done)
|
||||
{
|
||||
done = 1;
|
||||
class_add_behavior(self, [NSCString class]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,11 +43,11 @@
|
|||
|
||||
+ (void) initialize
|
||||
{
|
||||
static done = 0;
|
||||
static int done = 0;
|
||||
if (!done)
|
||||
{
|
||||
class_add_behavior([NSString class], [String class]);
|
||||
done = 1;
|
||||
class_add_behavior([NSString class], [String class]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue