From bd00b2f261a0f04ed4071b6a8dd88fe086c5221a Mon Sep 17 00:00:00 2001 From: mogemimi Date: Thu, 2 Jun 2016 15:30:24 +0900 Subject: [PATCH] Fix unused parameter warning --- cocos/2d/CCActionCatmullRom.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cocos/2d/CCActionCatmullRom.cpp b/cocos/2d/CCActionCatmullRom.cpp index 48022a025d..a00bbc18ba 100644 --- a/cocos/2d/CCActionCatmullRom.cpp +++ b/cocos/2d/CCActionCatmullRom.cpp @@ -57,6 +57,9 @@ PointArray* PointArray::create(ssize_t capacity) bool PointArray::initWithCapacity(ssize_t capacity) { _controlPoints = new (std::nothrow) vector(); + if (capacity > 0) { + _controlPoints->reserve(capacity); + } return true; }