From 057db2444c7237bd3c7234777eb6de3ea9c3d5b8 Mon Sep 17 00:00:00 2001 From: James Chen Date: Fri, 15 Jan 2016 00:50:20 +0800 Subject: [PATCH] Removes unused code in Material::initWithFile. --- cocos/renderer/CCMaterial.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cocos/renderer/CCMaterial.cpp b/cocos/renderer/CCMaterial.cpp index 5b5d1aa8dd..8d8ac7d815 100644 --- a/cocos/renderer/CCMaterial.cpp +++ b/cocos/renderer/CCMaterial.cpp @@ -105,10 +105,6 @@ bool Material::initWithGLProgramState(cocos2d::GLProgramState *state) bool Material::initWithFile(const std::string& validfilename) { - Data data = FileUtils::getInstance()->getDataFromFile(validfilename); - char* bytes = (char*)data.getBytes(); - bytes[data.getSize()-1]='\0'; - // Warning: properties is not a "Ref" object, must be manually deleted Properties* properties = Properties::createNonRefCounted(validfilename);