Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(247)

Side by Side Diff: src/utils/SkOSFile.cpp

Issue 96099: Whitespace fix: remove whitespace from the end of lines.
Patch Set: Created 16 years, 11 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/utils/SkNinePatch.cpp ('k') | src/utils/SkParse.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include "SkOSFile.h" 1 #include "SkOSFile.h"
2 2
3 #ifdef SK_BUILD_FOR_WIN 3 #ifdef SK_BUILD_FOR_WIN
4 4
5 static uint16_t* concat_to_16(const char src[], const char suffix[]) 5 static uint16_t* concat_to_16(const char src[], const char suffix[])
6 { 6 {
7 size_t i, len = strlen(src); 7 size_t i, len = strlen(src);
8 size_t len2 = 3 + (suffix ? strlen(suffix) : 0); 8 size_t len2 = 3 + (suffix ? strlen(suffix) : 0);
9 uint16_t* dst = (uint16_t*)sk_malloc_throw((len + len2) * sizeof(uint16_t)); 9 uint16_t* dst = (uint16_t*)sk_malloc_throw((len + len2) * sizeof(uint16_t));
10 10
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 } 165 }
166 else 166 else
167 fSuffix.reset(); 167 fSuffix.reset();
168 } 168 }
169 169
170 // returns true if suffix is empty, or if str ends with suffix 170 // returns true if suffix is empty, or if str ends with suffix
171 static bool issuffixfor(const SkString& suffix, const char str[]) 171 static bool issuffixfor(const SkString& suffix, const char str[])
172 { 172 {
173 size_t suffixLen = suffix.size(); 173 size_t suffixLen = suffix.size();
174 size_t strLen = strlen(str); 174 size_t strLen = strlen(str);
175 175
176 return strLen >= suffixLen && 176 return strLen >= suffixLen &&
177 suffixLen == 0 || 177 suffixLen == 0 ||
178 memcmp(suffix.c_str(), str + strLen - suffixLen, suffixLen) == 0; 178 memcmp(suffix.c_str(), str + strLen - suffixLen, suffixLen) == 0;
179 } 179 }
180 180
181 #include <sys/stat.h> 181 #include <sys/stat.h>
182 182
183 bool SkOSFile::Iter::next(SkString* name, bool getDir) 183 bool SkOSFile::Iter::next(SkString* name, bool getDir)
184 { 184 {
185 if (fDIR) 185 if (fDIR)
(...skipping 28 matching lines...) Expand all
214 if (name) 214 if (name)
215 name->set(entry->d_name); 215 name->set(entry->d_name);
216 return true; 216 return true;
217 } 217 }
218 } 218 }
219 return false; 219 return false;
220 } 220 }
221 221
222 #endif 222 #endif
223 223
OLDNEW
« no previous file with comments | « src/utils/SkNinePatch.cpp ('k') | src/utils/SkParse.cpp » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b