From f92cfcf3628ad455ad2e11011db5573563447688 Mon Sep 17 00:00:00 2001 From: "robertphillips@google.com" Date: Mon, 17 Sep 2012 13:38:57 +0000 Subject: [PATCH] Fixed unused variable compiler complaint http://codereview.appspot.com/6496129/ git-svn-id: http://skia.googlecode.com/svn/trunk@5567 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/utils/win/SkWGL_win.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/utils/win/SkWGL_win.cpp b/src/utils/win/SkWGL_win.cpp index e06c6e4..922ba28 100644 --- a/src/utils/win/SkWGL_win.cpp +++ b/src/utils/win/SkWGL_win.cpp @@ -118,14 +118,17 @@ int SkWGLExtensions::selectFormat(const int formats[], for (int i = 0; i < formatCount; ++i) { static const int queryAttrs[] = { SK_WGL_COVERAGE_SAMPLES, + // Keep COLOR_SAMPLES at the end so it can be skipped SK_WGL_COLOR_SAMPLES, }; int answers[2]; - int queryAttrCnt = supportsCoverage ? 2 : 1; + int queryAttrCnt = supportsCoverage ? + SK_ARRAY_COUNT(queryAttrs) : + SK_ARRAY_COUNT(queryAttrs) - 1; this->getPixelFormatAttribiv(dc, formats[i], 0, - SK_ARRAY_COUNT(queryAttrs), + queryAttrCnt, queryAttrs, answers); rankedFormats[i].fFormat = formats[i]; -- 2.7.4