From fad8f9f1da6a44d23bc41193af8a551864f4df4f Mon Sep 17 00:00:00 2001 From: yangxiao Date: Tue, 27 Jan 2015 16:31:15 +0800 Subject: [PATCH] format --- cocos/renderer/CCGLProgram.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cocos/renderer/CCGLProgram.cpp b/cocos/renderer/CCGLProgram.cpp index 01bea45748..5996c9a066 100644 --- a/cocos/renderer/CCGLProgram.cpp +++ b/cocos/renderer/CCGLProgram.cpp @@ -675,11 +675,13 @@ bool GLProgram::updateUniformLocation(GLint location, const GLvoid* data, unsign } else { - if (element->second.second < bytes){ + if (element->second.second < bytes) + { GLvoid* value = realloc(element->second.first, bytes); memcpy(value, data, bytes ); _hashForUniforms[location] = std::make_pair(value, bytes); - }else + } + else memcpy(element->second.first, data, bytes); } }