Skip to content

Commit ab6fc61

Browse files
authored
Fix clang-tidy (#6270)
1 parent 913cdc0 commit ab6fc61

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

GoogleDataTransport/GDTCORLibrary/GDTCORPlatform.m

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -179,17 +179,17 @@ GDTCORNetworkMobileSubtype GDTCORNetworkMobileSubTypeMessage() {
179179
}
180180

181181
NSData *_Nullable GDTCOREncodeArchive(id<NSSecureCoding> obj,
182-
NSString *archivePath,
182+
NSString *filePath,
183183
NSError *_Nullable *error) {
184184
BOOL result = NO;
185-
if (archivePath.length > 0) {
185+
if (filePath.length > 0) {
186186
result = [[NSFileManager defaultManager]
187-
createDirectoryAtPath:[archivePath stringByDeletingLastPathComponent]
187+
createDirectoryAtPath:[filePath stringByDeletingLastPathComponent]
188188
withIntermediateDirectories:YES
189189
attributes:nil
190190
error:error];
191191
if (result == NO || *error) {
192-
GDTCORLogDebug(@"Attempt to create directory failed: path:%@ error:%@", archivePath, *error);
192+
GDTCORLogDebug(@"Attempt to create directory failed: path:%@ error:%@", filePath, *error);
193193
return nil;
194194
}
195195
}
@@ -207,12 +207,12 @@ GDTCORNetworkMobileSubtype GDTCORNetworkMobileSubTypeMessage() {
207207
GDTCORLogDebug(@"Encoding an object failed: %@", *error);
208208
return nil;
209209
}
210-
if (archivePath.length > 0) {
211-
result = [resultData writeToFile:archivePath options:NSDataWritingAtomic error:error];
210+
if (filePath.length > 0) {
211+
result = [resultData writeToFile:filePath options:NSDataWritingAtomic error:error];
212212
if (result == NO || *error) {
213-
GDTCORLogDebug(@"Attempt to write archive failed: path:%@ error:%@", archivePath, *error);
213+
GDTCORLogDebug(@"Attempt to write archive failed: path:%@ error:%@", filePath, *error);
214214
} else {
215-
GDTCORLogDebug(@"Writing archive succeeded: %@", archivePath);
215+
GDTCORLogDebug(@"Writing archive succeeded: %@", filePath);
216216
}
217217
}
218218
} else {
@@ -222,12 +222,12 @@ GDTCORNetworkMobileSubtype GDTCORNetworkMobileSubTypeMessage() {
222222
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
223223
resultData = [NSKeyedArchiver archivedDataWithRootObject:obj];
224224
#pragma clang diagnostic pop
225-
if (archivePath.length > 0) {
226-
result = [resultData writeToFile:archivePath options:NSDataWritingAtomic error:error];
225+
if (filePath.length > 0) {
226+
result = [resultData writeToFile:filePath options:NSDataWritingAtomic error:error];
227227
if (result == NO || *error) {
228-
GDTCORLogDebug(@"Attempt to write archive failed: URL:%@ error:%@", archivePath, *error);
228+
GDTCORLogDebug(@"Attempt to write archive failed: URL:%@ error:%@", filePath, *error);
229229
} else {
230-
GDTCORLogDebug(@"Writing archive succeeded: %@", archivePath);
230+
GDTCORLogDebug(@"Writing archive succeeded: %@", filePath);
231231
}
232232
}
233233
} @catch (NSException *exception) {
@@ -238,7 +238,7 @@ GDTCORNetworkMobileSubtype GDTCORNetworkMobileSubTypeMessage() {
238238
userInfo:@{NSLocalizedFailureReasonErrorKey : errorString}];
239239
}
240240
GDTCORLogDebug(@"Attempt to write archive. successful:%@ URL:%@ error:%@",
241-
result ? @"YES" : @"NO", archivePath, *error);
241+
result ? @"YES" : @"NO", filePath, *error);
242242
}
243243
return resultData;
244244
}

0 commit comments

Comments
 (0)