Fixed 64-bit integer truncation issues in shader translator.
This is an incompatible API change, but one which is necessary in
order to improve correctness of the code. The API version in
ShaderLang.h is updated and, unfortunately, the define renamed to
something less ambiguous due to conflicts on some Android buildbots.
Temporary patches in Chromium and WebKit will be landed separately to
support this upgrade.
BUG=403,404,405,406,407,408,409
Review URL: https://codereview.appspot.com/7300058
Conflicts:
include/GLSLANG/ShaderLang.h
git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1960 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/compiler/MapLongVariableNames.cpp b/src/compiler/MapLongVariableNames.cpp
index a503101..a41d20f 100644
--- a/src/compiler/MapLongVariableNames.cpp
+++ b/src/compiler/MapLongVariableNames.cpp
@@ -8,7 +8,7 @@
namespace {
-TString mapLongName(int id, const TString& name, bool isGlobal)
+TString mapLongName(size_t id, const TString& name, bool isGlobal)
{
ASSERT(name.size() > MAX_SHORTENED_IDENTIFIER_SIZE);
TStringStream stream;
@@ -70,7 +70,7 @@
originalName, mappedName));
}
-int LongNameMap::Size() const
+size_t LongNameMap::Size() const
{
return mLongNameMap.size();
}
@@ -115,7 +115,7 @@
const char* mappedName = mGlobalMap->Find(name.c_str());
if (mappedName != NULL)
return mappedName;
- int id = mGlobalMap->Size();
+ size_t id = mGlobalMap->Size();
TString rt = mapLongName(id, name, true);
mGlobalMap->Insert(name.c_str(), rt.c_str());
return rt;