Skip to content

Commit

Permalink
Fix wrong default value in saveToFile
Browse files Browse the repository at this point in the history
  • Loading branch information
caiiiycuk committed Apr 14, 2017
1 parent 87ebee9 commit cfba8a1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions cocos2dx/cocoa/CCObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@ cocos2d::SEL_MenuHandler menu_selector_impl(R(O::*f)(Types ...)) {
#define add_schedule_selector(func) void schedule_selector_##func(float) { func(); }
#define add_menu_selector(func) void menu_selector_##func(Object*) { func(); }

#define schedule_selector_(_SELECTOR) static_cast<cocos2d::SEL_SCHEDULE>(&_SELECTOR##_schedule_selector)
#define menu_selector_(_SELECTOR) menu_selector_impl(&_SELECTOR##_menu_selector)
#define add_schedule_selector_(func) void func##_schedule_selector(float) { func(); }
#define add_menu_selector_(func) void func##_menu_selector(Object*) { func(); }

// new callbacks based on C++11
#define CC_CALLBACK_0(__selector__,__target__, ...) std::bind(&__selector__,__target__, ##__VA_ARGS__)
#define CC_CALLBACK_1(__selector__,__target__, ...) std::bind(&__selector__,__target__, std::placeholders::_1, ##__VA_ARGS__)
Expand Down
2 changes: 1 addition & 1 deletion cocos2dx/platform/CCImage.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ class CC_DLL Image : public Object
@param isToRGB whether the image is saved as RGB format.
*/
bool saveToFile(const char *filePath, bool isToRGB = true);
bool saveToFile(const char *filePath, Image::Format format, bool isToRGB = true);
bool saveToFile(const char *filePath, Image::Format format, bool isToRGB = false);

protected:
bool initWithJpgData(const void *data, int dataLen);
Expand Down

0 comments on commit cfba8a1

Please sign in to comment.