Closed Bug 102185 Opened 23 years ago Closed 23 years ago

NumberFunctionCall::evaluate needs cleanup

Categories

(Core :: XSLT, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: sicking, Assigned: sicking)

Details

Attachments

(2 files)

NumberFunctionCall::evaluate could defenatly do with some cleaning up. round() is broken on windows and the implementation of sum is suboptimal. Some of the function also needs some NaN love
As you whack it hard, whack it harder: Could you add a modeline? and /** **/ -> /* */? With * in the lines. Have CEILING, FLOOR, ROUND and SUM check their input parms before the switch and handle NUMBER separatly, and recieveError on wrong argument count. Hrm. recieve. bah. receive. But that's a different error. Maybe you could do the evaluateToNumber, NaN, Inf foo for CEILING, FLOOR and ROUND in one piece, too? Axel
Done, I also cleaned up the NumberFunctions enum (only .h file changes) and renamed type->mType. I didn't do the "evaluateToNumber, NaN, Inf foo for CEILING, FLOOR and ROUND in one piece" since IMHO the code obfuscation by the amount of |if|s was bigger then the codereuse
Status: NEW → ASSIGNED
Comment on attachment 52560 [details] [diff] [review] ver 2 r=me if you add the modeline to NumberFunctionCall.cpp. Axel
Attachment #52560 - Flags: review+
Comment on attachment 52560 [details] [diff] [review] ver 2 sr=shaver
Attachment #52560 - Flags: superreview+
checked in. Thanks for the reviews.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
verified
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: