mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-28 12:15:37 +08:00
Increased warning levels to -Wall -Wextra, and fixed Xcode 7 beta issues
Summary: @public I've increased the warning levels in the OSS frameworks, which caught a bunch of minor issues. I also fixed some new errors in Xcode 7 relating to designated initializers and TLS security. Test Plan: * Test the sample apps and make sure they still work. * Run tests.
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
|
||||
#import "RCTFPSGraph.h"
|
||||
|
||||
#import "RCTAssert.h"
|
||||
#import "RCTDefines.h"
|
||||
|
||||
#if RCT_DEV
|
||||
@@ -32,7 +33,7 @@
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame graphPosition:(RCTFPSGraphPosition)position name:(NSString *)name color:(UIColor *)color
|
||||
{
|
||||
if (self = [super initWithFrame:frame]) {
|
||||
if ((self = [super initWithFrame:frame])) {
|
||||
_margin = 2;
|
||||
_prevTime = -1;
|
||||
_maxFPS = 0;
|
||||
@@ -42,8 +43,10 @@
|
||||
_frames = malloc(sizeof(float) * _length);
|
||||
memset(_frames, 0, sizeof(float) * _length);
|
||||
|
||||
_name = name;
|
||||
_position = position;
|
||||
_name = name ?: @"FPS";
|
||||
_position = position ?: RCTFPSGraphPositionLeft;
|
||||
|
||||
color = color ?: [UIColor greenColor];
|
||||
_graph = [self createGraph:color];
|
||||
_label = [self createLabel:color];
|
||||
|
||||
@@ -53,6 +56,9 @@
|
||||
return self;
|
||||
}
|
||||
|
||||
RCT_NOT_IMPLEMENTED(-initWithFrame:(CGRect)frame)
|
||||
RCT_NOT_IMPLEMENTED(-initWithCoder:(NSCoder *)aDecoder)
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
free(_frames);
|
||||
|
||||
Reference in New Issue
Block a user