mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-12 13:37:00 -04:00
fix warnings about fabs(Scriptable<double>)
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1276 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
+7
-7
@@ -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) {
|
|||||||
|
|
||||||
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);
|
||||||
|
|||||||
Reference in New Issue
Block a user