Commit f6e46ac7 authored by twanvl's avatar twanvl

fix warnings about fabs(Scriptable<double>)

parent 501e853b
...@@ -132,7 +132,7 @@ inline bool is_set(const Scriptable<double>& x) { ...@@ -132,7 +132,7 @@ inline bool is_set(const Scriptable<double>& x) {
return x.isScripted() || x < 100000; return x.isScripted() || x < 100000;
} }
inline bool is_setw(const Scriptable<double>& x) { inline bool is_setw(const Scriptable<double>& x) {
return x.isScripted() || fabs(x) > 0.001; return x.isScripted() || fabs(x()) > 0.001;
} }
int Style::update(Context& ctx) { int Style::update(Context& ctx) {
...@@ -188,12 +188,12 @@ int Style::update(Context& ctx) { ...@@ -188,12 +188,12 @@ int Style::update(Context& ctx) {
bool Style::isVisible() const { bool Style::isVisible() const {
return visible return visible
&& (width) > 0 && (width()) > 0
&& fabs(left) < 100000 && fabs(left()) < 100000
&& fabs(right) < 100000 && fabs(right()) < 100000
&& (height) > 0 && (height()) > 0
&& fabs(top) < 100000 && fabs(top()) < 100000
&& fabs(bottom) < 100000; && fabs(bottom()) < 100000;
} }
bool Style::hasSize() const { bool Style::hasSize() const {
int h = is_setw(width) + is_set(left) + is_set(right); int h = is_setw(width) + is_set(left) + is_set(right);
......
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