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

Side by Side Diff: tools/skdiff_utils.cpp

Issue 27343002: Second wave of Win64 warning cleanup (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: switched count_glyphs back to int Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/views/win/SkOSWindow_win.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 #include "skdiff.h" 7 #include "skdiff.h"
8 #include "skdiff_utils.h" 8 #include "skdiff_utils.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkData.h" 10 #include "SkData.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 output.append(newSubstring); 108 output.append(newSubstring);
109 first_char = match_char + oldSubstringLen; 109 first_char = match_char + oldSubstringLen;
110 } 110 }
111 output.append(first_char); 111 output.append(first_char);
112 return output; 112 return output;
113 } 113 }
114 114
115 static SkString filename_to_derived_filename(const SkString& filename, const cha r *suffix) { 115 static SkString filename_to_derived_filename(const SkString& filename, const cha r *suffix) {
116 SkString diffName (filename); 116 SkString diffName (filename);
117 const char* cstring = diffName.c_str(); 117 const char* cstring = diffName.c_str();
118 int dotOffset = strrchr(cstring, '.') - cstring; 118 size_t dotOffset = strrchr(cstring, '.') - cstring;
119 diffName.remove(dotOffset, diffName.size() - dotOffset); 119 diffName.remove(dotOffset, diffName.size() - dotOffset);
120 diffName.append(suffix); 120 diffName.append(suffix);
121 121
122 // In case we recursed into subdirectories, replace slashes with something e lse 122 // In case we recursed into subdirectories, replace slashes with something e lse
123 // so the diffs will all be written into a single flat directory. 123 // so the diffs will all be written into a single flat directory.
124 diffName = replace_all(diffName, PATH_DIV_STR, "_"); 124 diffName = replace_all(diffName, PATH_DIV_STR, "_");
125 return diffName; 125 return diffName;
126 } 126 }
127 127
128 SkString filename_to_diff_filename(const SkString& filename) { 128 SkString filename_to_diff_filename(const SkString& filename) {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 drp->fDifference.fStatus = DiffResource::kDoesNotExist_Status; 177 drp->fDifference.fStatus = DiffResource::kDoesNotExist_Status;
178 } 178 }
179 if (write_bitmap(drp->fWhite.fFullPath, drp->fWhite.fBitmap)) { 179 if (write_bitmap(drp->fWhite.fFullPath, drp->fWhite.fBitmap)) {
180 drp->fWhite.fStatus = DiffResource::kExists_Status; 180 drp->fWhite.fStatus = DiffResource::kExists_Status;
181 } else { 181 } else {
182 drp->fWhite.fStatus = DiffResource::kDoesNotExist_Status; 182 drp->fWhite.fStatus = DiffResource::kDoesNotExist_Status;
183 } 183 }
184 } 184 }
185 } 185 }
186 } 186 }
OLDNEW
« no previous file with comments | « src/views/win/SkOSWindow_win.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698