Provide safer and more convenient constant union accessors.
TRAC #22676
Signed-off-by: Geoff Lang
Signed-off-by: Shannon Woods
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2071 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/compiler/ForLoopUnroll.cpp b/src/compiler/ForLoopUnroll.cpp
index fdc3f44..27a13ea 100644
--- a/src/compiler/ForLoopUnroll.cpp
+++ b/src/compiler/ForLoopUnroll.cpp
@@ -1,5 +1,5 @@
//
-// Copyright (c) 2002-2011 The ANGLE Project Authors. All rights reserved.
+// Copyright (c) 2002-2013 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
@@ -210,6 +210,6 @@
int ForLoopUnroll::evaluateIntConstant(TIntermConstantUnion* node)
{
ASSERT((node != NULL) && (node->getUnionArrayPointer() != NULL));
- return node->getUnionArrayPointer()->getIConst();
+ return node->getIConst(0);
}