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

Unified Diff: media/tools/shader_bench/shader_bench.cc

Issue 22920003: Use ARRAYSIZE_UNSAFE to find the number of painters in shader_bench. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 4 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: media/tools/shader_bench/shader_bench.cc
diff --git a/media/tools/shader_bench/shader_bench.cc b/media/tools/shader_bench/shader_bench.cc
index 8f0594eb8edbb10812be980392ff21ac8e25e939..b26733ce03263282f7c53966bc009d8d4825fea9 100644
--- a/media/tools/shader_bench/shader_bench.cc
+++ b/media/tools/shader_bench/shader_bench.cc
@@ -138,7 +138,6 @@ int main(int argc, char** argv) {
context->SetSwapInterval(0);
// Initialize and name GPU painters.
- static const int kNumPainters = 3;
static const struct {
const char* name;
GPUPainter* painter;
@@ -148,7 +147,7 @@ int main(int argc, char** argv) {
};
// Run GPU painter tests.
- for (int i = 0; i < kNumPainters; i++) {
+ for (size_t i = 0; i < ARRAYSIZE_UNSAFE(painters); i++) {
scoped_ptr<GPUPainter> painter(painters[i].painter);
painter->LoadFrames(&frames);
painter->SetGLContext(surface, context);
« 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