HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

IsUnitType bug..

01-28-2008, 08:39 AM#1
cohadar
I see wc3Mapotimizer has an option for fixing this.
"at the cost of performance" - witch is stupidity because one more comparison is not a performance loss in any real situation.

Anyways that was not my question,
my question is why is this not part of Jasshelper or PJASS?

What good is that bugfix if it does not fix it while in testing mode.
01-28-2008, 08:46 AM#2
The Elite
i havnt heard of the bug, please enlightin me
01-28-2008, 09:34 AM#3
cohadar
http://www.wc3jass.com/viewtopic.php?t=2370
01-28-2008, 06:40 PM#4
masda70
The safest thing is to have the habit of adding an extra ==true in front of each problematic IsUnitType and always tick "no optimizations on conditions" when you run wc3optimizer. I wouldn't be able to rest assured if JASSHELPER did the bug fixing for me.
01-28-2008, 07:50 PM#5
Vexorian
Quote:
Originally Posted by cohadar
I see wc3Mapotimizer has an option for fixing this.
"at the cost of performance" - witch is stupidity because one more comparison is not a performance loss in any real situation.

Anyways that was not my question,
my question is why is this not part of Jasshelper or PJASS?

What good is that bugfix if it does not fix it while in testing mode.
Mostly because it fixes an optimizer problem and not a problem with your code?

The extreme solution that optimizer does at the expense of performance is an extra function call...
01-28-2008, 11:26 PM#6
cohadar
Quote:
Originally Posted by Vexorian
The extreme solution that optimizer does at the expense of performance is an extra function call...

errrr... why is that?
Could not simply do a == true comparison?
01-29-2008, 01:24 AM#7
Jazradel
I'm slightly confused. To clarify, that bug only occurs when:
IsUnitType is inside a boolexpr
without ==true/and/or/not
Using any UNIT_TYPE, except HERO
Is that correct?
01-29-2008, 02:29 AM#8
Vexorian
Quote:
Originally Posted by cohadar
errrr... why is that?
Could not simply do a == true comparison?
It normally just adds !=null to every boolean return values using it. But I don't remember in which case it really was necessary more, but this is the reason it is something to enable the !=null is automatic.