ktb223 / shiftit

Automatically exported from code.google.com/p/shiftit
0 stars 0 forks source link

Strange initializer in the source code #35

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I have found a few lines like this one in the source code:

> if (self == [super init])

but Apple clearly says that it should be either:

> if (self = [super init])

or

> self = [super init]
> if (self) // or: if (self != nil)

because the call to [super init] can change the value of self, and it must be 
set as the new self. I'll try to issue a patch if you need it.

Thank you.

Original issue reported on code.google.com by shm...@gmail.com on 8 Jul 2010 at 11:24