summaryrefslogtreecommitdiff
path: root/src/sim/mathexpr.cc
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2016-06-07 14:27:49 +0100
committerAndreas Hansson <andreas.hansson@arm.com>2016-06-07 14:27:49 +0100
commit8d177d128f14831f9490467863efb9c92d1480bc (patch)
tree1327df3de5ec70581a1bd9e17923273f41fbc660 /src/sim/mathexpr.cc
parent0257fdee9190a3935bc851e32c68465a8cb70a7d (diff)
downloadgem5-8d177d128f14831f9490467863efb9c92d1480bc.tar.xz
sim: Make clang happy
Once again appeasing clang.
Diffstat (limited to 'src/sim/mathexpr.cc')
-rw-r--r--src/sim/mathexpr.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sim/mathexpr.cc b/src/sim/mathexpr.cc
index d94639823..85c130ad0 100644
--- a/src/sim/mathexpr.cc
+++ b/src/sim/mathexpr.cc
@@ -40,6 +40,7 @@
#include "sim/mathexpr.hh"
#include <algorithm>
+#include <cmath>
#include <regex>
#include <string>
@@ -47,7 +48,7 @@
MathExpr::MathExpr(std::string expr)
: ops(
- std::array<OpSearch, uNeg + 1> {
+ std::array<OpSearch, uNeg + 1> {{
OpSearch {true, bAdd, 0, '+', [](double a, double b) { return a + b; }},
OpSearch {true, bSub, 0, '-', [](double a, double b) { return a - b; }},
OpSearch {true, bMul, 1, '*', [](double a, double b) { return a * b; }},
@@ -55,7 +56,7 @@ MathExpr::MathExpr(std::string expr)
OpSearch {false,uNeg, 2, '-', [](double a, double b) { return -b; }},
OpSearch {true, bPow, 3, '^', [](double a, double b) {
return std::pow(a,b); }
- },
+ }},
})
{
// Cleanup