Skip to content

Commit

Permalink
CHORE - Remove Trailing Spaces
Browse files Browse the repository at this point in the history
Summary:Remove Trailing Spaces.

Why:
Sometimes there are conflicts with trailing spaces
Saves space
Those whose tools automatically delete them will have their pr watered down with trailing space removal
Closes facebook#6787

Differential Revision: D3144704

fb-gh-sync-id: d8a62f115a3f8a8a49d5b07f56c540a02af38cf8
fbshipit-source-id: d8a62f115a3f8a8a49d5b07f56c540a02af38cf8
  • Loading branch information
Nick authored and Facebook Github Bot 2 committed Apr 6, 2016
1 parent 37caef2 commit 2a03182
Show file tree
Hide file tree
Showing 41 changed files with 184 additions and 184 deletions.
2 changes: 1 addition & 1 deletion Examples/UIExplorer/DatePickerAndroidExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ var DatePickerAndroidExample = React.createClass({
async showPicker(stateKey, options) {
try {
var newState = {};
const {action, year, month, day} = await DatePickerAndroid.open(options);
const {action, year, month, day} = await DatePickerAndroid.open(options);
if (action === DatePickerAndroid.dismissedAction) {
newState[stateKey + 'Text'] = 'dismissed';
} else {
Expand Down
2 changes: 1 addition & 1 deletion Examples/UIExplorer/ImageEditingExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ class ImageCropper extends React.Component {
);
this._minimumZoomScale = Math.max(
this.props.size.width / this._scaledImageSize.width,
this.props.size.height / this._scaledImageSize.height
this.props.size.height / this._scaledImageSize.height
);
this._updateTransformData(
this._contentOffset,
Expand Down
2 changes: 1 addition & 1 deletion Examples/UIExplorer/TextInputExample.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ exports.examples = [
secureTextEntry={true}
style={styles.singleLine}
/>
<TextInput
<TextInput
secureTextEntry={true}
style={[styles.singleLine, {color: 'red'}]}
placeholder="color is supported too"
Expand Down
2 changes: 1 addition & 1 deletion Examples/UIExplorer/UIExplorerUnitTests/OCMock/OCMArg.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#import <Foundation/Foundation.h>

@interface OCMArg : NSObject
@interface OCMArg : NSObject

// constraining arguments

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#import <Foundation/Foundation.h>


@interface OCMConstraint : NSObject
@interface OCMConstraint : NSObject

+ (instancetype)constraint;
- (BOOL)evaluate:(id)value;
Expand Down
12 changes: 6 additions & 6 deletions Examples/UIExplorer/UIExplorerUnitTests/RCTBridgeTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,10 @@ - (void)testCallUnregisteredModuleMethod
NSString *injectedStuff;
RUN_RUNLOOP_WHILE(!(injectedStuff = _jsExecutor.injectedStuff[@"__fbBatchedBridgeConfig"]));
XCTAssertNotNil(injectedStuff);

__block NSNumber *testModuleID = nil;
__block NSNumber *testMethodID = nil;

NSArray *remoteModuleConfig = RCTJSONParse(injectedStuff, NULL)[@"remoteModuleConfig"];
[remoteModuleConfig enumerateObjectsUsingBlock:^(id moduleConfig, NSUInteger i, __unused BOOL *stop) {
if ([moduleConfig isKindOfClass:[NSArray class]] && [moduleConfig[0] isEqualToString:@"UnregisteredTestModule"]) {
Expand All @@ -253,15 +253,15 @@ - (void)testCallUnregisteredModuleMethod
*stop = YES;
}
}];

XCTAssertNotNil(testModuleID);
XCTAssertNotNil(testMethodID);

NSArray *args = @[];
NSArray *buffer = @[@[testModuleID], @[testMethodID], @[args]];

[_bridge.batchedBridge handleBuffer:buffer];

dispatch_sync(_unregisteredTestModule.methodQueue, ^{
XCTAssertTrue(_unregisteredTestModule.testMethodCalled);
});
Expand Down
4 changes: 2 additions & 2 deletions Libraries/ActionSheetIOS/ActionSheetIOS.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ var ActionSheetIOS = {
callback
);
},

/**
* Display the iOS share sheet. The `options` object should contain
* one or both of:
*
*
* - `message` (string) - a message to share
* - `url` (string) - a URL to share
*
Expand Down
2 changes: 1 addition & 1 deletion Libraries/ActionSheetIOS/RCTActionSheetManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ - (CGRect)sourceRectInView:(UIView *)sourceView
while (controller.presentedViewController) {
controller = controller.presentedViewController;
}

if (controller == nil) {
RCTLogError(@"Tried to display action sheet but there is no application window. options: %@", options);
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ var SegmentedControlIOS = React.createClass({
values: PropTypes.arrayOf(PropTypes.string),

/**
* The index in `props.values` of the segment to be (pre)selected.
* The index in `props.values` of the segment to be (pre)selected.
*/
selectedIndex: PropTypes.number,

Expand Down
4 changes: 2 additions & 2 deletions Libraries/Image/ImageEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type ImageCropData = {
*/
size: {
width: number;
height: number;
height: number;
};
/**
* (Optional) size to scale the cropped image to.
Expand All @@ -52,7 +52,7 @@ class ImageEditor {
/**
* Crop the image specified by the URI param. If URI points to a remote
* image, it will be downloaded automatically. If the image cannot be
* loaded/downloaded, the failure callback will be called.
* loaded/downloaded, the failure callback will be called.
*
* If the cropping process is successful, the resultant cropped image
* will be stored in the ImageStore, and the URI returned in the success
Expand Down
4 changes: 2 additions & 2 deletions Libraries/Image/ImageStylePropTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var ImageStylePropTypes = {
borderRadius: ReactPropTypes.number,
overflow: ReactPropTypes.oneOf(['visible', 'hidden']),

/**
/**
* iOS-Specific style to "tint" an image.
* Changes the color of all the non-transparent pixels to the tintColor.
* @platform ios
Expand All @@ -44,7 +44,7 @@ var ImageStylePropTypes = {
* implementation of rounded corners:
* - Certain resize modes, such as 'contain'
* - Animated GIFs
*
*
* A typical way to use this prop is with images displayed on a solid
* background and setting the `overlayColor` to the same color
* as the background.
Expand Down
10 changes: 5 additions & 5 deletions Libraries/RCTTest/FBSnapshotTestCase/FBSnapshotTestController.m
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ - (BOOL)_recordSnapshotOfViewOrLayer:(id)viewOrLayer
- (UIImage *)_snapshotViewOrLayer:(id)viewOrLayer
{
CALayer *layer = nil;

if ([viewOrLayer isKindOfClass:[UIView class]]) {
return [self _renderView:viewOrLayer];
} else if ([viewOrLayer isKindOfClass:[CALayer class]]) {
Expand All @@ -370,19 +370,19 @@ - (UIImage *)_renderLayer:(CALayer *)layer
UIGraphicsBeginImageContextWithOptions(bounds.size, NO, 0);
CGContextRef context = UIGraphicsGetCurrentContext();
NSAssert1(context, @"Could not generate context for layer %@", layer);

CGContextSaveGState(context);
{
[layer renderInContext:context];
}
CGContextRestoreGState(context);

UIImage *snapshot = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();

return snapshot;
}

- (UIImage *)_renderView:(UIView *)view
{
[view layoutIfNeeded];
Expand Down
12 changes: 6 additions & 6 deletions Libraries/RCTTest/FBSnapshotTestCase/UIImage+Compare.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ @implementation UIImage (Compare)
- (BOOL)compareWithImage:(UIImage *)image
{
NSAssert(CGSizeEqualToSize(self.size, image.size), @"Images must be same size.");

// The images have the equal size, so we could use the smallest amount of bytes because of byte padding
size_t minBytesPerRow = MIN(CGImageGetBytesPerRow(self.CGImage), CGImageGetBytesPerRow(image.CGImage));
size_t referenceImageSizeBytes = CGImageGetHeight(self.CGImage) * minBytesPerRow;
Expand All @@ -47,7 +47,7 @@ - (BOOL)compareWithImage:(UIImage *)image
free(imagePixels);
return NO;
}

CGContextRef referenceImageContext = CGBitmapContextCreate(referenceImagePixels,
CGImageGetWidth(self.CGImage),
CGImageGetHeight(self.CGImage),
Expand All @@ -64,24 +64,24 @@ - (BOOL)compareWithImage:(UIImage *)image
CGImageGetColorSpace(image.CGImage),
(CGBitmapInfo)kCGImageAlphaPremultipliedLast
);

CGFloat scaleFactor = [UIScreen mainScreen].scale;
CGContextScaleCTM(referenceImageContext, scaleFactor, scaleFactor);
CGContextScaleCTM(imageContext, scaleFactor, scaleFactor);

if (!referenceImageContext || !imageContext) {
CGContextRelease(referenceImageContext);
CGContextRelease(imageContext);
free(referenceImagePixels);
free(imagePixels);
return NO;
}

CGContextDrawImage(referenceImageContext, CGRectMake(0.0f, 0.0f, self.size.width, self.size.height), self.CGImage);
CGContextDrawImage(imageContext, CGRectMake(0.0f, 0.0f, image.size.width, image.size.height), image.CGImage);
CGContextRelease(referenceImageContext);
CGContextRelease(imageContext);

BOOL imageEqual = (memcmp(referenceImagePixels, imagePixels, referenceImageSizeBytes) == 0);
free(referenceImagePixels);
free(imagePixels);
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Text/RCTTextView.m
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ - (BOOL)textView:(RCTUITextView *)textView shouldChangeTextInRange:(NSRange)rang
if (textView.textWasPasted) {
textView.textWasPasted = NO;
} else {

[_eventDispatcher sendTextEventWithType:RCTTextEventTypeKeyPress
reactTag:self.reactTag
text:nil
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Utilities/UIManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const _takeSnapshot = UIManager.takeSnapshot;
* Capture an image of the screen, window or an individual view. The image
* will be stored in a temporary file that will only exist for as long as the
* app is running.
*
*
* The `view` argument can be the literal string `window` if you want to
* capture the entire window, or it can be a reference to a specific
* React Native component.
Expand Down
2 changes: 1 addition & 1 deletion React/Layout/Layout.c
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ static void layoutNodeImpl(css_node_t *node, float parentMaxWidth, float parentM
if (isRowUndefined || isColumnUndefined) {
css_dim_t measureDim = node->measure(
node->context,

width,
height
);
Expand Down
2 changes: 1 addition & 1 deletion ReactAndroid/DevExperience.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Make sure you have the following installed:
- Android Support Repository 17 (for Android Support Library)

Follow steps on https://github.com/facebook/react-native/blob/master/react-native-cli/CONTRIBUTING.md, but be sure to bump the version of react-native in package.json to some version > 0.9 (latest published npm version) or set up proxying properly for react-native

- From the react-native-android repo:
- `./gradlew :ReactAndroid:installArchives`
- *Assuming you already have android-jsc installed to local maven repo, no steps included here*
Expand Down
2 changes: 1 addition & 1 deletion ReactAndroid/release.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ afterEvaluate { project ->
repositories.mavenDeployer {
// Deploy to react-native/android, ready to publish to npm
repository url: "file://${projectDir}/../android"

configureReactNativePom pom
}
}
Expand Down
Loading

0 comments on commit 2a03182

Please sign in to comment.