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

Unified Diff: dm/DM.cpp

Issue 1806903002: Split uninteresting hash lines correctly on Windows. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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: dm/DM.cpp
diff --git a/dm/DM.cpp b/dm/DM.cpp
index d558e08ca64772b6d85ee4398d26bf59bb160c2a..6748544ecaba7ec6ebbc3e48016284e91a63ff13 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -262,6 +262,12 @@ static void gather_gold() {
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+#if defined(SK_BUILD_FOR_WIN32)
+ static const char* kNewline = "\r\n";
+#else
+ static const char* kNewline = "\n";
+#endif
+
static SkTHashSet<SkString> gUninterestingHashes;
static void gather_uninteresting_hashes() {
@@ -273,7 +279,7 @@ static void gather_uninteresting_hashes() {
return;
}
SkTArray<SkString> hashes;
- SkStrSplit((const char*)data->data(), "\n", &hashes);
+ SkStrSplit((const char*)data->data(), kNewline, &hashes);
for (const SkString& hash : hashes) {
gUninterestingHashes.add(hash);
}
« 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