mirror of https://github.com/axmolengine/axmol.git
fix use raw char* to represent string.
This commit is contained in:
parent
d7199204bd
commit
b6ed783b0b
|
@ -51,10 +51,9 @@ namespace cocostudio
|
|||
bool fn = DICTOOL->checkObjectExist_json(options, "fontName");
|
||||
if (fn)
|
||||
{
|
||||
std::string tp_c = jsonPath;
|
||||
const char* cmfPath = DICTOOL->getStringValue_json(options, "fontName");
|
||||
const char* cmf_tp = tp_c.append(cmfPath).c_str();
|
||||
label->setFontName(cmf_tp);
|
||||
std::string fontName = DICTOOL->getStringValue_json(options, "fontName");
|
||||
std::string fontFilePath = jsonPath.append(fontName);
|
||||
label->setFontName(fontFilePath);
|
||||
}
|
||||
bool aw = DICTOOL->checkObjectExist_json(options, "areaWidth");
|
||||
bool ah = DICTOOL->checkObjectExist_json(options, "areaHeight");
|
||||
|
|
Loading…
Reference in New Issue