mirror of https://github.com/axmolengine/axmol.git
Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into developTest
This commit is contained in:
commit
31bccd52d4
|
@ -307,18 +307,20 @@ std::string FileUtilsApple::getFullPathForDirectoryAndFilename(const std::string
|
||||||
Dictionary* FileUtilsApple::createDictionaryWithContentsOfFile(const std::string& filename)
|
Dictionary* FileUtilsApple::createDictionaryWithContentsOfFile(const std::string& filename)
|
||||||
{
|
{
|
||||||
std::string fullPath = fullPathForFilename(filename);
|
std::string fullPath = fullPathForFilename(filename);
|
||||||
NSString* pPath = [NSString stringWithUTF8String:fullPath.c_str()];
|
NSString* path = [NSString stringWithUTF8String:fullPath.c_str()];
|
||||||
NSDictionary* pDict = [NSDictionary dictionaryWithContentsOfFile:pPath];
|
NSDictionary* dict = [NSDictionary dictionaryWithContentsOfFile:path];
|
||||||
|
|
||||||
if (pDict != nil)
|
if (dict != nil)
|
||||||
{
|
{
|
||||||
Dictionary* pRet = Dictionary::create();
|
auto ret = new Dictionary();
|
||||||
for (id key in [pDict allKeys]) {
|
ret->init();
|
||||||
id value = [pDict objectForKey:key];
|
|
||||||
addValueToDict(key, value, pRet);
|
for (id key in [dict allKeys]) {
|
||||||
|
id value = [dict objectForKey:key];
|
||||||
|
addValueToDict(key, value, ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
return pRet;
|
return ret;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue