Module: nagvis Branch: master Commit: 2902fdf53b2f5f45853b76068d49e25e373f000e URL: http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=2902fdf53b2f5f45853b76068d49e25e373f000e
Author: LaMi <[email protected]> Date: Thu Apr 1 17:41:46 2010 +0200 Removed repeated getType calls --- share/server/core/classes/objects/NagVisMapObj.php | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/share/server/core/classes/objects/NagVisMapObj.php b/share/server/core/classes/objects/NagVisMapObj.php index 1b185eb..a5e74a0 100644 --- a/share/server/core/classes/objects/NagVisMapObj.php +++ b/share/server/core/classes/objects/NagVisMapObj.php @@ -163,7 +163,8 @@ class NagVisMapObj extends NagVisStatefulObject { $i = 0; // Loop all objects except the stateless ones and count them foreach($this->members AS $OBJ) { - if($OBJ->getType() != 'textbox' && $OBJ->getType() != 'shape' && $OBJ->getType() != 'line') { + $type = $OBJ->getType(); + if($type != 'textbox' && $type != 'shape' && $type != 'line') { $i++; } } @@ -206,7 +207,8 @@ class NagVisMapObj extends NagVisStatefulObject { public function hasStatefulObjects() { // Loop all objects on the map foreach($this->members AS $OBJ) { - if($OBJ->getType() != 'textbox' && $OBJ->getType() != 'shape' && $OBJ->getType() != 'line') { + $type = $OBJ->getType(); + if($type != 'textbox' && $type != 'shape' && $type != 'line') { // Exit on first result return true; } ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Nagvis-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nagvis-checkins
