Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1917)

Unified Diff: ui/gfx/ios/NSString+CrStringDrawing.mm

Issue 997183002: CrStringDrawing cleanup: added braces to index arithmetics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/ios/NSString+CrStringDrawing.mm
diff --git a/ui/gfx/ios/NSString+CrStringDrawing.mm b/ui/gfx/ios/NSString+CrStringDrawing.mm
index cc9f799b7997e22466b551027f97ee49657cecfc..6d41f3f09d9a578eb142130d3f5ce1826a4c34ab 100644
--- a/ui/gfx/ios/NSString+CrStringDrawing.mm
+++ b/ui/gfx/ios/NSString+CrStringDrawing.mm
@@ -42,7 +42,7 @@
return @"";
if (index >= [self length])
return [[self retain] autorelease];
- return [[self substringToIndex:index - 1] stringByAppendingString:@"…"];
+ return [[self substringToIndex:(index - 1)] stringByAppendingString:@"…"];
}
- (NSString*)cr_stringByElidingToFitSize:(CGSize)bounds {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698