Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix -Wimplicit-retain-self warnings in ODWLogger.mm #1235

Merged
merged 2 commits into from
Jan 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading