Don't depend on the PLATFORM variable being defined

Change-Id: Ia1d0e5f320dfc0c6ab1cf8a588c297cbbc3c0df3
This commit is contained in:
Romain Goyet
2016-03-18 16:53:01 +01:00
parent 2c702874fd
commit cddb2ab887

View File

@@ -1,8 +1,5 @@
#if PLATFORM==simulator
#include <cmath>
#endif
#include <poincare/power.h>
#include <math.h>
#include "layout/exponent_layout.h"
Power::Power(Expression * base, Expression * exponent) :
@@ -16,12 +13,7 @@ Power::~Power() {
}
float Power::approximate(Context& context) {
#if PLATFORM==simulator
return powf(m_base->approximate(context), m_exponent->approximate(context));
#else
// TODO(fraimundo): do this for real
return 1f;
#endif
}
ExpressionLayout * Power::createLayout(ExpressionLayout * parent) {