From 9ac0b68981f46052c518cf0c30c4f6f8561008ef Mon Sep 17 00:00:00 2001 From: Walzer Date: Mon, 21 May 2012 17:56:09 +0800 Subject: [PATCH] modify CCBReader.cpp to CCBReader_v2.cpp in vcproj/vcxproj. --- .../extensions/CCBReader/CCBReader_v2.cpp | 6 +++--- cocos2dx/proj.win32/cocos2d-win32.vcproj | 20 +++++++++++++++++++ cocos2dx/proj.win32/cocos2d-win32.vcxproj | 2 +- .../proj.win32/cocos2d-win32.vcxproj.filters | 2 +- 4 files changed, 25 insertions(+), 5 deletions(-) mode change 100644 => 100755 cocos2dx/proj.win32/cocos2d-win32.vcproj mode change 100644 => 100755 cocos2dx/proj.win32/cocos2d-win32.vcxproj mode change 100644 => 100755 cocos2dx/proj.win32/cocos2d-win32.vcxproj.filters diff --git a/cocos2dx/extensions/CCBReader/CCBReader_v2.cpp b/cocos2dx/extensions/CCBReader/CCBReader_v2.cpp index 74a1446b9d..f82b7dbbd9 100644 --- a/cocos2dx/extensions/CCBReader/CCBReader_v2.cpp +++ b/cocos2dx/extensions/CCBReader/CCBReader_v2.cpp @@ -34,19 +34,19 @@ USING_NS_CC_EXT; int CCBReader::intValFromDict(CCDictionary* dict, const std::string key) { CCString* valueString = (CCString*) dict->objectForKey(key.c_str()); - return valueString->intValue(); + return valueString? valueString->intValue() : 0; } float CCBReader::floatValFromDict(CCDictionary* dict, const std::string key) { CCString* valueString = (CCString*) dict->objectForKey(key.c_str()); - return valueString->floatValue(); + return valueString? valueString->floatValue() : 0; } bool CCBReader::boolValFromDict(CCDictionary* dict, const std::string key) { CCString* valueString = (CCString*) dict->objectForKey(key.c_str()); - return (bool) valueString->intValue(); + return valueString? ((bool)(valueString->intValue())) : false; } CCPoint CCBReader::pointValFromDict(CCDictionary* dict, const std::string key) diff --git a/cocos2dx/proj.win32/cocos2d-win32.vcproj b/cocos2dx/proj.win32/cocos2d-win32.vcproj old mode 100644 new mode 100755 index 125b6d13da..901aef7562 --- a/cocos2dx/proj.win32/cocos2d-win32.vcproj +++ b/cocos2dx/proj.win32/cocos2d-win32.vcproj @@ -1231,6 +1231,26 @@ > + + + + + + + + + + - + diff --git a/cocos2dx/proj.win32/cocos2d-win32.vcxproj.filters b/cocos2dx/proj.win32/cocos2d-win32.vcxproj.filters old mode 100644 new mode 100755 index 5826d5ec70..4b8b744c77 --- a/cocos2dx/proj.win32/cocos2d-win32.vcxproj.filters +++ b/cocos2dx/proj.win32/cocos2d-win32.vcxproj.filters @@ -486,7 +486,7 @@ extensions\CCBReader - + extensions\CCBReader