mirror of
https://github.com/geode-sdk/geode.git
synced 2025-04-01 07:40:18 -04:00
cast the c_str pointer
This commit is contained in:
parent
caac958c37
commit
2034b3e62d
1 changed files with 2 additions and 2 deletions
|
@ -114,8 +114,8 @@ public:
|
|||
* it means that you needn't do a release operation unless you retain it.
|
||||
*/
|
||||
// Geode change: this is kind of a hack but i think it will work
|
||||
static inline CCString* create(std::string& str) {
|
||||
return CCString::createWithData(str.c_str(), str.size());
|
||||
static inline CCString* create(std::string const& str) {
|
||||
return CCString::createWithData(reinterpret_cast<unsigned char const*>(str.c_str()), str.size());
|
||||
}
|
||||
|
||||
/** create a string with format, it's similar with the c function 'sprintf', the default buffer size is (1024*100) bytes,
|
||||
|
|
Loading…
Add table
Reference in a new issue