Skip to content

Commit

Permalink
[MDC/LibraryInfo] Add "k" to string const to fix clang-tidy
Browse files Browse the repository at this point in the history
Following http://clang.llvm.org/extra/clang-tidy/checks/google-objc-global-variable-declaration.html we should be doing this.

This also addresses the constant pointer issue that clang recommends.

PiperOrigin-RevId: 320390941
  • Loading branch information
codeman7 authored and material-automation committed Jul 9, 2020
1 parent 222ae37 commit a998a88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/LibraryInfo/src/MDCLibraryInfo.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
// This string is updated automatically as a part of the release process and should not be edited
// manually. Do not rename this constant or change the formatting without updating the release
// scripts.
static NSString const *MDCLibraryInfoVersionString = @"110.2.0";
static NSString* const kMDCLibraryInfoVersionString = @"110.2.0";

@implementation MDCLibraryInfo

+ (NSString *)versionString {
return [MDCLibraryInfoVersionString copy]; // Copy because caller isn't expecting `const`.
return [kMDCLibraryInfoVersionString copy]; // Copy because caller isn't expecting `const`.
}

@end

0 comments on commit a998a88

Please sign in to comment.