Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(371)

Unified Diff: Source/core/html/canvas/WebGLRenderingContext.cpp

Issue 124943003: Remove 'String::append' from some of the blink source. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Incorporated review comments Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/html/canvas/WebGLRenderingContext.cpp
diff --git a/Source/core/html/canvas/WebGLRenderingContext.cpp b/Source/core/html/canvas/WebGLRenderingContext.cpp
old mode 100644
new mode 100755
index 34518a4a7716693788ddbe93124c86e9ce7e2ca2..6984f7dd17cd7b77ca5d08461ad09fbe72a1aa02
--- a/Source/core/html/canvas/WebGLRenderingContext.cpp
+++ b/Source/core/html/canvas/WebGLRenderingContext.cpp
@@ -2687,11 +2687,8 @@ WebGLGetInfo WebGLRenderingContext::getUniform(WebGLProgram* program, const WebG
// If it's an array, we need to iterate through each element, appending "[index]" to the name.
for (GC3Dint index = 0; index < info.size; ++index) {
String name = info.name;
- if (info.size > 1 && index >= 1) {
- name.append('[');
- name.append(String::number(index));
- name.append(']');
- }
+ if (info.size > 1 && index >= 1)
+ name = info.name + "[" + String::number(index) + "]";
// Now need to look this up by name again to find its location
GC3Dint loc = m_context->getUniformLocation(objectOrZero(program), name);
if (loc == location) {

Powered by Google App Engine
This is Rietveld 408576698