mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 13:10:59 +00:00
NSGraphicsContext: Suppress incompatible pointer type warning (#250)
``` NSGraphicsContext.m:349:50: warning: incompatible pointer types sending 'Class' to parameter of type 'id<NSCopying>' [-Wincompatible-pointer-types] methods = [[classMethodTable objectForKey: [self class]] pointerValue]; ^~~~~~~~~~~~ /usr/local/include/Foundation/NSDictionary.h:115:26: note: passing argument to parameter 'aKey' here (GS_GENERIC_TYPE(KeyT))aKey; // Primitive ^ NSGraphicsContext.m:354:37: warning: incompatible pointer types sending 'Class' to parameter of type 'id<NSCopying>' [-Wincompatible-pointer-types] forKey: [self class]]; ^~~~~~~~~~~~ ```
This commit is contained in:
parent
c50123f870
commit
c6082e31db
1 changed files with 2 additions and 2 deletions
|
@ -346,12 +346,12 @@ NSGraphicsContext *GSCurrentContext(void)
|
|||
* be protected from other threads.
|
||||
*/
|
||||
[contextLock lock];
|
||||
methods = [[classMethodTable objectForKey: [self class]] pointerValue];
|
||||
methods = [[classMethodTable objectForKey: (id<NSCopying>)[self class]] pointerValue];
|
||||
if (methods == 0)
|
||||
{
|
||||
methods = [[self class] _initializeMethodTable];
|
||||
[classMethodTable setObject: [NSValue valueWithPointer: methods]
|
||||
forKey: [self class]];
|
||||
forKey: (id<NSCopying>)[self class]];
|
||||
}
|
||||
[contextLock unlock];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue