diff --git a/extensions/spine/SkeletonRenderer.cpp b/extensions/spine/SkeletonRenderer.cpp index 292a16edca..bc594ad145 100644 --- a/extensions/spine/SkeletonRenderer.cpp +++ b/extensions/spine/SkeletonRenderer.cpp @@ -188,7 +188,7 @@ void SkeletonRenderer::initWithJsonFile (const std::string& skeletonDataFile, At SkeletonJson json(_attachmentLoader); json.setScale(scale); SkeletonData* skeletonData = json.readSkeletonDataFile(skeletonDataFile.c_str()); - CCASSERT(skeletonData, !json.getError().isEmpty() ? json.getError().buffer() : "Error reading skeleton data."); + CCASSERT(skeletonData, (!json.getError().isEmpty() ? json.getError().buffer() : "Error reading skeleton data.")); _ownsSkeleton = true; setSkeletonData(skeletonData, true); @@ -205,7 +205,7 @@ void SkeletonRenderer::initWithJsonFile (const std::string& skeletonDataFile, co SkeletonJson json(_attachmentLoader); json.setScale(scale); SkeletonData* skeletonData = json.readSkeletonDataFile(skeletonDataFile.c_str()); - CCASSERT(skeletonData, !json.getError().isEmpty() ? json.getError().buffer() : "Error reading skeleton data."); + CCASSERT(skeletonData, (!json.getError().isEmpty() ? json.getError().buffer() : "Error reading skeleton data.")); _ownsSkeleton = true; _ownsAtlas = true; @@ -221,7 +221,7 @@ void SkeletonRenderer::initWithBinaryFile (const std::string& skeletonDataFile, SkeletonBinary binary(_attachmentLoader); binary.setScale(scale); SkeletonData* skeletonData = binary.readSkeletonDataFile(skeletonDataFile.c_str()); - CCASSERT(skeletonData, !binary.getError().isEmpty() ? binary.getError().buffer() : "Error reading skeleton data."); + CCASSERT(skeletonData, (!binary.getError().isEmpty() ? binary.getError().buffer() : "Error reading skeleton data.")); _ownsSkeleton = true; setSkeletonData(skeletonData, true); @@ -237,7 +237,7 @@ void SkeletonRenderer::initWithBinaryFile (const std::string& skeletonDataFile, SkeletonBinary binary(_attachmentLoader); binary.setScale(scale); SkeletonData* skeletonData = binary.readSkeletonDataFile(skeletonDataFile.c_str()); - CCASSERT(skeletonData, !binary.getError().isEmpty() ? binary.getError().buffer() : "Error reading skeleton data."); + CCASSERT(skeletonData, (!binary.getError().isEmpty() ? binary.getError().buffer() : "Error reading skeleton data.")); _ownsSkeleton = true; _ownsAtlas = true; setSkeletonData(skeletonData, true); diff --git a/tests/cpp-tests/Classes/SpineTest/SpineTest.cpp b/tests/cpp-tests/Classes/SpineTest/SpineTest.cpp index 5c4a03788b..c3db5b490b 100644 --- a/tests/cpp-tests/Classes/SpineTest/SpineTest.cpp +++ b/tests/cpp-tests/Classes/SpineTest/SpineTest.cpp @@ -150,7 +150,7 @@ bool BatchingExample::init () { SkeletonJson* json = new (__FILE__, __LINE__) SkeletonJson(_attachmentLoader); json->setScale(0.6f); // Resizes skeleton data to 60% of the size it was in Spine. _skeletonData = json->readSkeletonDataFile("spineboy-pro.json"); - CCASSERT(_skeletonData, json->getError().isEmpty() ? json->getError().buffer() : "Error reading skeleton data file."); + CCASSERT(_skeletonData, (json->getError().isEmpty() ? json->getError().buffer() : "Error reading skeleton data file.")); delete json; // Setup mix times.