From 5a30d2c9dfa703f044495ae368b0ac6216e43e23 Mon Sep 17 00:00:00 2001 From: scrawl Date: Fri, 20 Apr 2012 19:55:36 +0200 Subject: [PATCH] GCC compiling fix (std::abs) --- hlslang/GLSLCodeGen/glslOutput.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hlslang/GLSLCodeGen/glslOutput.cpp b/hlslang/GLSLCodeGen/glslOutput.cpp index 123db82..73d3d0a 100644 --- a/hlslang/GLSLCodeGen/glslOutput.cpp +++ b/hlslang/GLSLCodeGen/glslOutput.cpp @@ -5,6 +5,8 @@ #include "glslOutput.h" +#include + int getElements( EGlslSymbolType t ) { @@ -228,7 +230,7 @@ void TGlslOutputTraverser::outputLineDirective (int line) { if (line <= 0 || !current) return; - if (abs(line - m_LastLineOutput) < 4) // don't sprinkle too many #line directives ;) + if (std::abs(line - m_LastLineOutput) < 4) // don't sprinkle too many #line directives ;) return; std::stringstream& out = current->getActiveOutput(); out << '\n';