From 5f5c00b7d2093a00cd74cdc72be07182d1425373 Mon Sep 17 00:00:00 2001 From: "Huabing.Xu" Date: Wed, 28 Jan 2015 10:32:22 +0800 Subject: [PATCH] remove duplicated QUEUE_GROUP::QUEUE_COUNT and QUEUE_GROUP::QUEUE_GROUP_SIZE --- cocos/renderer/CCRenderer.cpp | 4 ++-- cocos/renderer/CCRenderer.h | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cocos/renderer/CCRenderer.cpp b/cocos/renderer/CCRenderer.cpp index b876ff1ebd..72983cb7d5 100644 --- a/cocos/renderer/CCRenderer.cpp +++ b/cocos/renderer/CCRenderer.cpp @@ -92,7 +92,7 @@ void RenderQueue::push_back(RenderCommand* command) ssize_t RenderQueue::size() const { ssize_t result(0); - for(int index = 0; index < QUEUE_GROUP::QUEUE_GROUP_SIZE; ++index) + for(int index = 0; index < QUEUE_GROUP::QUEUE_COUNT; ++index) { result += _commands[index].size(); } @@ -110,7 +110,7 @@ void RenderQueue::sort() RenderCommand* RenderQueue::operator[](ssize_t index) const { - for(int queIndex = 0; queIndex < QUEUE_GROUP::QUEUE_GROUP_SIZE; ++queIndex) + for(int queIndex = 0; queIndex < QUEUE_GROUP::QUEUE_COUNT; ++queIndex) { if(index < static_cast(_commands[queIndex].size())) return _commands[queIndex][index]; diff --git a/cocos/renderer/CCRenderer.h b/cocos/renderer/CCRenderer.h index a2177d7594..de8f3fbe1d 100644 --- a/cocos/renderer/CCRenderer.h +++ b/cocos/renderer/CCRenderer.h @@ -55,8 +55,7 @@ public: TRANSPARENT_3D = 2, GLOBALZ_ZERO = 3, GLOBALZ_POS = 4, - QUEUE_GROUP_SIZE = 5, - QUEUE_COUNT, + QUEUE_COUNT = 5, }; public: