From: bungeman@google.com Date: Mon, 19 Aug 2013 20:05:38 +0000 (+0000) Subject: Fix size_t to int conversion warning on Win64 in SkRTConf.h. X-Git-Tag: accepted/tizen/5.0/unified/20181102.025319~11208 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ffe95f541437f75bab0c4e3e656cf492e7ed29f0;p=platform%2Fupstream%2FlibSkiaSharp.git Fix size_t to int conversion warning on Win64 in SkRTConf.h. Review URL: https://codereview.chromium.org/23213004 git-svn-id: http://skia.googlecode.com/svn/trunk@10800 2bbb7eff-a529-9590-31e7-b0007b416f81 --- diff --git a/include/utils/SkRTConf.h b/include/utils/SkRTConf.h index dc1f461..1dc41c9 100644 --- a/include/utils/SkRTConf.h +++ b/include/utils/SkRTConf.h @@ -115,10 +115,8 @@ void SkRTConf::print(SkWStream *o) const { sprintf(outline, "%-30.30s", getName()); doPrint(&(outline[30])); sprintf(&(outline[60]), " %.128s", fDescription.c_str()); - if (' ' == outline[strlen(outline)-1]) { - for (int i = strlen(outline)-1 ; ' ' == outline[i] ; i--) { - outline[i] = '\0'; - } + for (size_t i = strlen(outline); i --> 0 && ' ' == outline[i];) { + outline[i] = '\0'; } o->writeText(outline); }