summaryrefslogtreecommitdiff
path: root/src/sim
diff options
context:
space:
mode:
Diffstat (limited to 'src/sim')
-rw-r--r--src/sim/clocked_object.hh2
-rw-r--r--src/sim/mathexpr.cc5
2 files changed, 4 insertions, 3 deletions
diff --git a/src/sim/clocked_object.hh b/src/sim/clocked_object.hh
index 25e2d0082..d85d226c9 100644
--- a/src/sim/clocked_object.hh
+++ b/src/sim/clocked_object.hh
@@ -264,7 +264,7 @@ class ClockedObject
void computeStats();
void pwrState(Enums::PwrState);
- void regStats();
+ void regStats() override;
protected:
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