From: Carlos Lopez Date: Fri, 2 Oct 2009 16:36:11 +0000 (+0200) Subject: Avoid some warning asking for explicit brackets. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=04220aae052a8ca622da6cc27c3ab547e9dd748f;p=synfig.git Avoid some warning asking for explicit brackets. --- diff --git a/synfig-core/src/synfig/valuenode_pow.cpp b/synfig-core/src/synfig/valuenode_pow.cpp index fa00618..20daaeb 100644 --- a/synfig-core/src/synfig/valuenode_pow.cpp +++ b/synfig-core/src/synfig/valuenode_pow.cpp @@ -170,14 +170,17 @@ ValueNode_Pow::operator()(Time t)const if (abs(power) < epsilon) //x^0 = 1 return 1; if (abs(base) < epsilon) + { if (power > 0) //0^x=0 return Real(0); else + { if ( ( ((int) power) % 2 != 0) && (base < 0) ) //(-0)^(-odd)=-inf return -infinite; else return infinite; - + } + } if (base <= epsilon && ((int) power) != power) //negative number to fractional power -> undefined power = ((int) power); //so round off power to nearest integer