From 6ad9909fb7ccc973f35bbd222b0f424b8c3df0d2 Mon Sep 17 00:00:00 2001 From: Mike Klein Date: Wed, 26 Oct 2016 10:35:22 -0400 Subject: Turn on -Wrange-loop-analysis. -Wrange-loop-analysis triggers when we use a new-style for loop in a way that appears to unintentionally call a copy constructor on each non-trivial loop element instead of operating on them by reference. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4000 Change-Id: If9e1b7fcc1f2789ae03c41c17abb17e60d564a8b Reviewed-on: https://skia-review.googlesource.com/4000 Reviewed-by: Ethan Nicholas Commit-Queue: Mike Klein --- tests/FontMgrTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/FontMgrTest.cpp') diff --git a/tests/FontMgrTest.cpp b/tests/FontMgrTest.cpp index c8c8b94cff..172bff3a06 100644 --- a/tests/FontMgrTest.cpp +++ b/tests/FontMgrTest.cpp @@ -690,7 +690,7 @@ static void test_matchStyleCSS3(skiatest::Reporter* reporter) { }; for (StyleSetTest& test : tests) { - for (const StyleSetTest::Case testCase : test.cases) { + for (const StyleSetTest::Case& testCase : test.cases) { SkAutoTUnref typeface(test.styleSet.matchStyle(testCase.pattern)); if (typeface) { REPORTER_ASSERT(reporter, typeface->fontStyle() == testCase.expectedResult); -- cgit v1.2.3