Skip to content

Commit eaa1002

Browse files
authored
chore: Use YES and NO for objc BOOL (#2717)
hanging true to YES and false to NO in objc files.
1 parent ce4cfaf commit eaa1002

12 files changed

+17
-17
lines changed

Sources/Sentry/SentryANRTracker.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ - (void)detectANRs
7272
NSTimeInterval sleepInterval = self.timeoutInterval / reportThreshold;
7373

7474
// Canceling the thread can take up to sleepInterval.
75-
while (true) {
75+
while (YES) {
7676
@synchronized(threadLock) {
7777
if (state != kSentryANRTrackerRunning) {
7878
break;

Sources/Sentry/SentryBreadcrumbTracker.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ + (BOOL)avoidSender:(id)sender forTarget:(id)target action:(NSString *)action
156156
forControlEvent:UIControlEventEditingChanged];
157157
return [actions containsObject:action];
158158
}
159-
return false;
159+
return NO;
160160
}
161161
#endif
162162

Sources/Sentry/SentryCrashDefaultMachineContextWrapper.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ + (void)load
2727

2828
- (void)fillContextForCurrentThread:(struct SentryCrashMachineContext *)context
2929
{
30-
sentrycrashmc_getContextForThread(sentrycrashthread_self(), context, true);
30+
sentrycrashmc_getContextForThread(sentrycrashthread_self(), context, YES);
3131
}
3232

3333
- (int)getThreadCount:(struct SentryCrashMachineContext *)context

Sources/Sentry/SentryCrashReportSink.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ - (void)sendReports:(NSArray *)reports onCompletion:(SentryCrashReportFilterComp
8181
}
8282
}
8383
if (onCompletion) {
84-
onCompletion(sentReports, TRUE, nil);
84+
onCompletion(sentReports, YES, nil);
8585
}
8686
}
8787

Sources/Sentry/SentryHub.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ - (void)startSession
9797
}
9898
_session = [[SentrySession alloc] initWithReleaseName:options.releaseName];
9999

100-
if (_errorsBeforeSession > 0 && options.enableAutoSessionTracking == true) {
100+
if (_errorsBeforeSession > 0 && options.enableAutoSessionTracking == YES) {
101101
_session.errors = _errorsBeforeSession;
102102
_errorsBeforeSession = 0;
103103
}
@@ -356,7 +356,7 @@ - (SentryId *)captureEvent:(SentryEvent *)event
356356
customSamplingContext:(NSDictionary<NSString *, id> *)customSamplingContext
357357
{
358358
return [self startTransactionWithContext:transactionContext
359-
bindToScope:false
359+
bindToScope:NO
360360
customSamplingContext:customSamplingContext];
361361
}
362362

Sources/Sentry/SentryPerformanceTracker.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ - (SentrySpanId *)startSpanWithName:(NSString *)name
6565
operation:operation];
6666

6767
[SentrySDK.currentHub.scope useSpan:^(id<SentrySpan> span) {
68-
BOOL bindToScope = true;
68+
BOOL bindToScope = YES;
6969
if (span != nil) {
7070
if ([SentryUIEventTracker isUIEventOperation:span.operation]) {
7171
SENTRY_LOG_DEBUG(
@@ -74,7 +74,7 @@ - (SentrySpanId *)startSpanWithName:(NSString *)name
7474
} else {
7575
SENTRY_LOG_DEBUG(@"Current scope span %@ is not tracking a UI event",
7676
span.spanId.sentrySpanIdString);
77-
bindToScope = false;
77+
bindToScope = NO;
7878
}
7979
}
8080

Sources/Sentry/SentrySpanContext.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ @implementation SentrySpanContext
99

1010
- (instancetype)initWithOperation:(NSString *)operation
1111
{
12-
return [self initWithOperation:operation sampled:false];
12+
return [self initWithOperation:operation sampled:NO];
1313
}
1414

1515
- (instancetype)initWithOperation:(NSString *)operation sampled:(SentrySampleDecision)sampled

Sources/Sentry/SentryStacktraceBuilder.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ - (SentryStacktrace *)buildStackTraceFromStackEntries:(SentryCrashStackEntry *)e
8686
- (SentryStacktrace *)buildStacktraceForThread:(SentryCrashThread)thread
8787
context:(struct SentryCrashMachineContext *)context
8888
{
89-
sentrycrashmc_getContextForThread(thread, context, false);
89+
sentrycrashmc_getContextForThread(thread, context, NO);
9090
SentryCrashStackCursor stackCursor;
9191
sentrycrashsc_initWithMachineContext(&stackCursor, MAX_STACKTRACE_LENGTH, context);
9292

Sources/Sentry/SentrySubClassFinder.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ - (void)actOnSubclassesOfViewControllerInImage:(NSString *)imageName block:(void
7777
- (BOOL)isClass:(Class)childClass subClassOf:(Class)parentClass
7878
{
7979
if (!childClass || childClass == parentClass) {
80-
return false;
80+
return NO;
8181
}
8282

8383
// Using a do while loop, like pointed out in Cocoa with Love

Sources/Sentry/SentrySwizzle.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ - (SentrySwizzleOriginalIMP)getOriginalImplementation
2727

2828
#if TEST
2929
@synchronized(self) {
30-
self.originalCalled = true;
30+
self.originalCalled = YES;
3131
}
3232
#endif
3333

0 commit comments

Comments
 (0)