Skip to content

Commit 5d539d1

Browse files
authored
Fix -Wimplicit-retain-self warnings in ODWLogger.mm (#1235)
1 parent e82b592 commit 5d539d1

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

wrappers/obj-c/ODWLogger.mm

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ -(void) logEventWithName:(NSString *)name
4242
std::string eventName = std::string([name UTF8String]);
4343
EventProperties event(eventName);
4444
PerformActionWithCppExceptionsCatch(^(void) {
45-
_wrappedLogger->LogEvent(event);
45+
self->_wrappedLogger->LogEvent(event);
4646
});
4747
if([ODWLogConfiguration enableConsoleLogging])
4848
{
@@ -108,7 +108,7 @@ -(void) logEventWithEventProperties: (nonnull ODWEventProperties*) properties
108108
EventProperties event;
109109
[self unwrapEventProperties: properties onEvent: event];
110110
PerformActionWithCppExceptionsCatch(^(void) {
111-
_wrappedLogger->LogEvent(event);
111+
self->_wrappedLogger->LogEvent(event);
112112
});
113113
if([ODWLogConfiguration enableConsoleLogging])
114114
{
@@ -127,7 +127,7 @@ -(void) logFailureWithSignature: (nonnull NSString*) signature
127127
std::string strDetail = std::string([detail UTF8String]);
128128

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

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

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

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

214214
PerformActionWithCppExceptionsCatch(^(void) {
215-
_wrappedLogger->LogTrace((TraceLevel)traceLevel, strMessage, event);
215+
self->_wrappedLogger->LogTrace((TraceLevel)traceLevel, strMessage, event);
216216
});
217217
if([ODWLogConfiguration enableConsoleLogging])
218218
{
@@ -226,7 +226,7 @@ -(void) logSessionWithState: (enum ODWSessionState)state
226226
EventProperties event;
227227
[self unwrapEventProperties: properties onEvent: event];
228228
PerformActionWithCppExceptionsCatch(^(void) {
229-
_wrappedLogger->LogSession((SessionState)state, event);
229+
self->_wrappedLogger->LogSession((SessionState)state, event);
230230
});
231231
if([ODWLogConfiguration enableConsoleLogging])
232232
{
@@ -249,7 +249,7 @@ -(void)setContextWithName:(nonnull NSString*)name
249249
PiiKind contextPiiKind = PiiKind(piiKind);
250250

251251
PerformActionWithCppExceptionsCatch(^(void) {
252-
_wrappedLogger->SetContext(strName, strValue, contextPiiKind);
252+
self->_wrappedLogger->SetContext(strName, strValue, contextPiiKind);
253253
});
254254
}
255255

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

270270
PerformActionWithCppExceptionsCatch(^(void) {
271-
_wrappedLogger->SetContext(strName, boolValue, contextPiiKind);
271+
self->_wrappedLogger->SetContext(strName, boolValue, contextPiiKind);
272272
});
273273
}
274274

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

289289
PerformActionWithCppExceptionsCatch(^(void) {
290-
_wrappedLogger->SetContext(strName, ticks, contextPiiKind);
290+
self->_wrappedLogger->SetContext(strName, ticks, contextPiiKind);
291291
});
292292
}
293293

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

307307
PerformActionWithCppExceptionsCatch(^(void) {
308-
_wrappedLogger->SetContext(strName, value, contextPiiKind);
308+
self->_wrappedLogger->SetContext(strName, value, contextPiiKind);
309309
});
310310
}
311311

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

325325
PerformActionWithCppExceptionsCatch(^(void) {
326-
_wrappedLogger->SetContext(strName, value, contextPiiKind);
326+
self->_wrappedLogger->SetContext(strName, value, contextPiiKind);
327327
});
328328
}
329329

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

343343
PerformActionWithCppExceptionsCatch(^(void) {
344-
_wrappedLogger->SetContext(strName, value, contextPiiKind);
344+
self->_wrappedLogger->SetContext(strName, value, contextPiiKind);
345345
});
346346
}
347347

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

362362
PerformActionWithCppExceptionsCatch(^(void) {
363-
_wrappedLogger->SetContext(strName, contextValue, contextPiiKind);
363+
self->_wrappedLogger->SetContext(strName, contextValue, contextPiiKind);
364364
});
365365
}
366366

0 commit comments

Comments
 (0)