mikeash / MAKVONotificationCenter

Better key-value observing for Cocoa
Other
528 stars 84 forks source link

Patch to fix a compilation warning. #8

Closed bourquep closed 12 years ago

bourquep commented 12 years ago

Hello,

After integrating the MAKVONotificationCenter source code into my project, I was getting this compilation warning:

Multiple methods named 'count' found

This warning is located in the code that handles adding/removing observers to all items in an array. The code checks if [target isKindOfClass:[NSArray class]], then calls [target count] if it is.

To remove the ambiguity (and the compiler warning), I added a (NSArray *) typecast to those [count] method invocations.