From 935f1b1a20f673b81e78bec913cd702ffc793c99 Mon Sep 17 00:00:00 2001 From: mtklein Date: Wed, 16 Mar 2016 08:37:19 -0700 Subject: Split uninteresting hash lines correctly on Windows. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1806903002 Review URL: https://codereview.chromium.org/1806903002 --- dm/DM.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dm/DM.cpp b/dm/DM.cpp index d558e08ca6..6748544eca 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 gUninterestingHashes; static void gather_uninteresting_hashes() { @@ -273,7 +279,7 @@ static void gather_uninteresting_hashes() { return; } SkTArray hashes; - SkStrSplit((const char*)data->data(), "\n", &hashes); + SkStrSplit((const char*)data->data(), kNewline, &hashes); for (const SkString& hash : hashes) { gUninterestingHashes.add(hash); } -- cgit v1.2.3