Use a hash map for faster resource lookups.
TRAC #14871
Signed-off-by: Daniel Koch
Author: Nicolas Capens

git-svn-id: https://angleproject.googlecode.com/svn/trunk@615 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/Program.cpp b/src/libGLESv2/Program.cpp
index 8ed4d41..6ad34c6 100644
--- a/src/libGLESv2/Program.cpp
+++ b/src/libGLESv2/Program.cpp
@@ -186,12 +186,9 @@
 
 int Program::getSemanticIndex(int attributeIndex)
 {
-    if (attributeIndex >= 0 && attributeIndex < MAX_VERTEX_ATTRIBS)
-    {
-        return mSemanticIndex[attributeIndex];
-    }
-
-    return -1;
+    ASSERT(attributeIndex >= 0 && attributeIndex < MAX_VERTEX_ATTRIBS);
+    
+    return mSemanticIndex[attributeIndex];
 }
 
 // Returns the index of the texture unit corresponding to a Direct3D 9 sampler