Skip to content

Commit

Permalink
Fix -Wimplicit-retain-self warnings in ODWLogger.mm
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoscumb committed Jan 25, 2024
1 parent 2f63392 commit 7b2ac25
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions wrappers/obj-c/ODWLogger.mm
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ -(void) logEventWithName:(NSString *)name
std::string eventName = std::string([name UTF8String]);
EventProperties event(eventName);
PerformActionWithCppExceptionsCatch(^(void) {
_wrappedLogger->LogEvent(event);
self->_wrappedLogger->LogEvent(event);
});
if([ODWLogConfiguration enableConsoleLogging])
{
Expand Down Expand Up @@ -108,7 +108,7 @@ -(void) logEventWithEventProperties: (nonnull ODWEventProperties*) properties
EventProperties event;
[self unwrapEventProperties: properties onEvent: event];
PerformActionWithCppExceptionsCatch(^(void) {
_wrappedLogger->LogEvent(event);
self->_wrappedLogger->LogEvent(event);
});
if([ODWLogConfiguration enableConsoleLogging])
{
Expand All @@ -127,7 +127,7 @@ -(void) logFailureWithSignature: (nonnull NSString*) signature
std::string strDetail = std::string([detail UTF8String]);

PerformActionWithCppExceptionsCatch(^(void) {
_wrappedLogger->LogFailure(strSignature, strDetail, event);
self->_wrappedLogger->LogFailure(strSignature, strDetail, event);
});
if([ODWLogConfiguration enableConsoleLogging])
{
Expand All @@ -150,7 +150,7 @@ -(void) logFailureWithSignature: (nonnull NSString*) signature
std::string strId = std::string([identifier UTF8String]);

PerformActionWithCppExceptionsCatch(^(void) {
_wrappedLogger->LogFailure(strSignature, strDetail, strCategory, strId, event);
self->_wrappedLogger->LogFailure(strSignature, strDetail, strCategory, strId, event);
});
if([ODWLogConfiguration enableConsoleLogging])
{
Expand All @@ -169,7 +169,7 @@ -(void) logPageViewWithId: (nonnull NSString*) identifier
std::string strPageName = std::string([pageName UTF8String]);

PerformActionWithCppExceptionsCatch(^(void) {
_wrappedLogger->LogPageView(strId, strPageName, event);
self->_wrappedLogger->LogPageView(strId, strPageName, event);
});
if([ODWLogConfiguration enableConsoleLogging])
{
Expand All @@ -194,7 +194,7 @@ -(void) logPageViewWithId: (nonnull NSString*) identifier
std::string strReferrerUri = std::string([referrerUri UTF8String]);

PerformActionWithCppExceptionsCatch(^(void) {
_wrappedLogger->LogPageView(strId, strPageName, strCategory, strUri, strReferrerUri, event);
self->_wrappedLogger->LogPageView(strId, strPageName, strCategory, strUri, strReferrerUri, event);
});
if([ODWLogConfiguration enableConsoleLogging])
{
Expand All @@ -212,7 +212,7 @@ -(void) logTraceWithTraceLevel: (enum ODWTraceLevel)traceLevel
std::string strMessage = std::string([message UTF8String]);

PerformActionWithCppExceptionsCatch(^(void) {
_wrappedLogger->LogTrace((TraceLevel)traceLevel, strMessage, event);
self->_wrappedLogger->LogTrace((TraceLevel)traceLevel, strMessage, event);
});
if([ODWLogConfiguration enableConsoleLogging])
{
Expand All @@ -226,7 +226,7 @@ -(void) logSessionWithState: (enum ODWSessionState)state
EventProperties event;
[self unwrapEventProperties: properties onEvent: event];
PerformActionWithCppExceptionsCatch(^(void) {
_wrappedLogger->LogSession((SessionState)state, event);
self->_wrappedLogger->LogSession((SessionState)state, event);
});
if([ODWLogConfiguration enableConsoleLogging])
{
Expand All @@ -249,7 +249,7 @@ -(void)setContextWithName:(nonnull NSString*)name
PiiKind contextPiiKind = PiiKind(piiKind);

PerformActionWithCppExceptionsCatch(^(void) {
_wrappedLogger->SetContext(strName, strValue, contextPiiKind);
self->_wrappedLogger->SetContext(strName, strValue, contextPiiKind);
});
}

Expand All @@ -268,7 +268,7 @@ -(void)setContextWithName:(nonnull NSString*)name
PiiKind contextPiiKind = PiiKind(piiKind);

PerformActionWithCppExceptionsCatch(^(void) {
_wrappedLogger->SetContext(strName, boolValue, contextPiiKind);
self->_wrappedLogger->SetContext(strName, boolValue, contextPiiKind);
});
}

Expand All @@ -287,7 +287,7 @@ -(void)setContextWithName:(nonnull NSString*)name
PiiKind contextPiiKind = PiiKind(piiKind);

PerformActionWithCppExceptionsCatch(^(void) {
_wrappedLogger->SetContext(strName, ticks, contextPiiKind);
self->_wrappedLogger->SetContext(strName, ticks, contextPiiKind);
});
}

Expand All @@ -305,7 +305,7 @@ -(void)setContextWithName:(nonnull NSString*)name
PiiKind contextPiiKind = PiiKind(piiKind);

PerformActionWithCppExceptionsCatch(^(void) {
_wrappedLogger->SetContext(strName, value, contextPiiKind);
self->_wrappedLogger->SetContext(strName, value, contextPiiKind);
});
}

Expand All @@ -323,7 +323,7 @@ -(void)setContextWithName:(nonnull NSString*)name
PiiKind contextPiiKind = PiiKind(piiKind);

PerformActionWithCppExceptionsCatch(^(void) {
_wrappedLogger->SetContext(strName, value, contextPiiKind);
self->_wrappedLogger->SetContext(strName, value, contextPiiKind);
});
}

Expand All @@ -341,7 +341,7 @@ -(void)setContextWithName:(nonnull NSString*)name
PiiKind contextPiiKind = PiiKind(piiKind);

PerformActionWithCppExceptionsCatch(^(void) {
_wrappedLogger->SetContext(strName, value, contextPiiKind);
self->_wrappedLogger->SetContext(strName, value, contextPiiKind);
});
}

Expand All @@ -360,7 +360,7 @@ -(void)setContextWithName:(nonnull NSString*)name
GUID_t contextValue = [ODWLogger castNSUUIDToUUID:value];

PerformActionWithCppExceptionsCatch(^(void) {
_wrappedLogger->SetContext(strName, contextValue, contextPiiKind);
self->_wrappedLogger->SetContext(strName, contextValue, contextPiiKind);
});
}

Expand Down

0 comments on commit 7b2ac25

Please sign in to comment.