diff --git a/cocos2dx/platform/blackberry/CCFileUtils.cpp b/cocos2dx/platform/blackberry/CCFileUtils.cpp index ac8ce63eb6..5017898f6b 100644 --- a/cocos2dx/platform/blackberry/CCFileUtils.cpp +++ b/cocos2dx/platform/blackberry/CCFileUtils.cpp @@ -212,7 +212,7 @@ void CCFileUtils::setResourceDirectory(const char* pszResourceDirectory) { m_obDirectory.append("/"); } - m_pSearchPathArray->insertObject(CCString::create(m_obDirectory.c_str()), 0); + m_searchPathArray.insert(m_searchPathArray.begin(), m_obDirectory); } std::string CCFileUtils::getWriteablePath() diff --git a/cocos2dx/platform/marmalade/CCFileUtils.cpp b/cocos2dx/platform/marmalade/CCFileUtils.cpp index 17a7eec671..738f5fa2ca 100644 --- a/cocos2dx/platform/marmalade/CCFileUtils.cpp +++ b/cocos2dx/platform/marmalade/CCFileUtils.cpp @@ -203,7 +203,7 @@ void CCFileUtils::setResourceDirectory(const char* pszResourceDirectory) { m_obDirectory.append("/"); } - m_pSearchPathArray->insertObject(CCString::create(m_obDirectory.c_str()), 0); + m_searchPathArray.insert(m_searchPathArray.begin(), m_obDirectory); } std::string CCFileUtils::getWriteablePath() diff --git a/cocos2dx/platform/win32/CCFileUtils.cpp b/cocos2dx/platform/win32/CCFileUtils.cpp index af66179284..b8a436e717 100644 --- a/cocos2dx/platform/win32/CCFileUtils.cpp +++ b/cocos2dx/platform/win32/CCFileUtils.cpp @@ -229,7 +229,7 @@ void CCFileUtils::setResourceDirectory(const char* pszResourceDirectory) m_obDirectory.append("/"); } - m_pSearchPathArray->insertObject(CCString::create(m_obDirectory.c_str()), 0); + m_searchPathArray.insert(m_searchPathArray.begin(), m_obDirectory); } string CCFileUtils::getWriteablePath()