Skip to content

Commit

Permalink
Merge pull request cocos2d#13710 from minggo/implement-function-in-cpp
Browse files Browse the repository at this point in the history
fix crash on xiaomi2 if cocos2d-x is built as a dynamic library
  • Loading branch information
pandamicro committed Sep 8, 2015
2 parents eab6dbe + bbe5861 commit d60eb21
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 5 additions & 0 deletions cocos/network/SocketIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1096,6 +1096,11 @@ void SIOClient::fireEvent(const std::string& eventName, const std::string& data)

CCLOGINFO("SIOClient::fireEvent no native event with name %s found", eventName.c_str());
}

void SIOClient::setTag(const char* tag)
{
_tag = tag;
}

//begin SocketIO methods
SocketIO *SocketIO::_inst = nullptr;
Expand Down
6 changes: 2 additions & 4 deletions cocos/network/SocketIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,8 @@ class CC_DLL SIOClient
* The tag is used to distinguish the various SIOClient objects.
* @param tag string object.
*/
inline void setTag(const char* tag)
{
_tag = tag;
};
void setTag(const char* tag);

/**
* Get tag of SIOClient.
* @return const char* the pointer point to the _tag.
Expand Down

0 comments on commit d60eb21

Please sign in to comment.