Skip to content

Commit 81c2e79

Browse files
generatedunixname89002005287564facebook-github-bot
authored andcommitted
Fix CQS signal readability-braces-around-statements in xplat/js/react-native-github/packages (#52700)
Summary: Pull Request resolved: #52700 Pull Request resolved: #52699 Reviewed By: cipolleschi Differential Revision: D78549834 fbshipit-source-id: a15a9faed579a1e650eabb6e028a48f9307ad22b
1 parent 9f09037 commit 81c2e79

File tree

4 files changed

+14
-7
lines changed

4 files changed

+14
-7
lines changed

packages/react-native/Libraries/FBLazyVector/FBLazyVector/FBLazyVector.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ class LazyVector {
5050

5151
const_reference at(size_type pos) const {
5252
#ifndef _LIBCPP_NO_EXCEPTIONS
53-
if (!(pos < _size))
53+
if (!(pos < _size)) {
5454
throw std::out_of_range("out of range");
55+
}
5556
#else
5657
assert(pos < _size || !"out of range");
5758
#endif

packages/react-native/Libraries/Image/RCTUIImageViewAnimated.mm

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,13 @@ static NSUInteger RCTDeviceFreeMemory(void)
2525
kern_return_t kern;
2626

2727
kern = host_page_size(host_port, &page_size);
28-
if (kern != KERN_SUCCESS)
28+
if (kern != KERN_SUCCESS) {
2929
return 0;
30+
}
3031
kern = host_statistics(host_port, HOST_VM_INFO, (host_info_t)&vm_stat, &host_size);
31-
if (kern != KERN_SUCCESS)
32+
if (kern != KERN_SUCCESS) {
3233
return 0;
34+
}
3335
return (vm_stat.free_count - vm_stat.speculative_count) * page_size;
3436
}
3537

@@ -278,8 +280,9 @@ - (void)displayDidRefresh:(CADisplayLink *)displayLink
278280
- (void)calculateMaxBufferCount
279281
{
280282
NSUInteger bytes = CGImageGetBytesPerRow(self.currentFrame.CGImage) * CGImageGetHeight(self.currentFrame.CGImage);
281-
if (bytes == 0)
283+
if (bytes == 0) {
282284
bytes = 1024;
285+
}
283286

284287
NSUInteger max = 0;
285288
if (self.maxBufferSize > 0) {

packages/react-native/React/Views/RefreshControl/RCTRefreshControl.m

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,9 @@ - (void)didMoveToWindow
7171

7272
- (void)beginRefreshingProgrammatically
7373
{
74-
if (!_hasMovedToWindow)
74+
if (!_hasMovedToWindow) {
7575
return;
76+
}
7677

7778
UInt64 beginRefreshingTimestamp = _currentRefreshingStateTimestamp;
7879
_refreshingProgrammatically = YES;
@@ -108,8 +109,9 @@ - (void)beginRefreshingProgrammatically
108109

109110
- (void)endRefreshingProgrammatically
110111
{
111-
if (!_hasMovedToWindow)
112+
if (!_hasMovedToWindow) {
112113
return;
114+
}
113115
// The contentOffset of the scrollview MUST be greater than the contentInset before calling
114116
// endRefreshing otherwise the next pull to refresh will not work properly.
115117
UIScrollView *scrollView = self.scrollView;

packages/react-native/ReactCommon/cxxreact/tests/jsbigstring.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ using namespace facebook::react;
1616
namespace {
1717
int tempFileFromString(std::string contents) {
1818
const char* tmpDir = getenv("TMPDIR");
19-
if (tmpDir == nullptr)
19+
if (tmpDir == nullptr) {
2020
tmpDir = "/tmp";
21+
}
2122
std::string tmp{tmpDir};
2223
tmp += "/temp.XXXXXX";
2324

0 commit comments

Comments
 (0)