mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Fix more warnings
This commit is contained in:
@@ -69,26 +69,4 @@
|
||||
#if TARGET_OS_IPHONE
|
||||
#import "POPDefines.h"
|
||||
|
||||
#if SCENEKIT_SDK_AVAILABLE
|
||||
#import <SceneKit/SceneKit.h>
|
||||
|
||||
/**
|
||||
Dirty hacks because iOS is weird and decided to define both SCNVector3's and SCNVector4's objCType as "t". However @encode(SCNVector3) and @encode(SCNVector4) both return the proper definition ("{SCNVector3=fff}" and "{SCNVector4=ffff}" respectively)
|
||||
|
||||
[[NSValue valueWithSCNVector3:SCNVector3Make(0.0, 0.0, 0.0)] objcType] returns "t", whereas it should return "{SCNVector3=fff}".
|
||||
|
||||
*flips table*
|
||||
*/
|
||||
@implementation NSValue (SceneKitFixes)
|
||||
|
||||
+ (NSValue *)valueWithSCNVector3:(SCNVector3)vec3 {
|
||||
return [NSValue valueWithBytes:&vec3 objCType:@encode(SCNVector3)];
|
||||
}
|
||||
|
||||
+ (NSValue *)valueWithSCNVector4:(SCNVector4)vec4 {
|
||||
return [NSValue valueWithBytes:&vec4 objCType:@encode(SCNVector4)];
|
||||
}
|
||||
|
||||
@end
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user