Commit 571fe348 by zmo@google.com

Don't append '_' to the end of prefix in long name mapping if the original name starts with '_'

Otherwise we will have '__' which is illegal. Review URL: https://codereview.appspot.com/5978058 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1044 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 1023bb55
#define MAJOR_VERSION 1
#define MINOR_VERSION 0
#define BUILD_VERSION 0
#define BUILD_REVISION 1041
#define BUILD_REVISION 1044
#define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x)
......
......@@ -15,7 +15,9 @@ TString mapLongName(int id, const TString& name, bool isGlobal)
stream << "webgl_";
if (isGlobal)
stream << "g";
stream << id << "_";
stream << id;
if (name[0] != '_')
stream << "_";
stream << name.substr(0, MAX_SHORTENED_IDENTIFIER_SIZE - stream.str().size());
return stream.str();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment