Commit 4f267868 by Jamie Madill

Fix Linux build.

We were missing several header includes necessary for GCC. Also our static assert macro had a bug, preventing us from using the same assert in multiple places. BUG=angle:568 Change-Id: I01bcdef033a9380f436cbf4bd2a9f11b1553887c Reviewed-on: https://chromium-review.googlesource.com/195471Reviewed-by: 's avatarShannon Woods <shannonwoods@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Tested-by: 's avatarJamie Madill <jmadill@chromium.org>
parent fbcc6345
......@@ -119,7 +119,9 @@ namespace gl
#if defined(_MSC_VER) && _MSC_VER >= 1600
#define META_ASSERT_MSG(condition, msg) static_assert(condition, msg)
#else
#define META_ASSERT_MSG(condition, msg) typedef int COMPILE_TIME_ASSERT_##__LINE__[static_cast<bool>(condition)?1:-1]
#define META_ASSERT_CONCAT(a, b) a ## b
#define META_ASSERT_CONCAT2(a, b) META_ASSERT_CONCAT(a, b)
#define META_ASSERT_MSG(condition, msg) typedef int META_ASSERT_CONCAT2(COMPILE_TIME_ASSERT_, __LINE__)[static_cast<bool>(condition)?1:-1]
#endif
#define META_ASSERT(condition) META_ASSERT_MSG(condition, "compile time assertion failed.")
......
......@@ -8,6 +8,7 @@
#include "common/mathutil.h"
#include <algorithm>
#include <math.h>
namespace gl
{
......
......@@ -17,6 +17,7 @@
#include <limits>
#include <algorithm>
#include <string.h>
namespace gl
{
......
......@@ -18,6 +18,7 @@
#include <GLES2/gl2ext.h>
#include <string>
#include <math.h>
namespace gl
{
......
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