Closed Bug 199655 Opened 21 years ago Closed 21 years ago

parseInt used instead of Math.round in printProgress.js, sendProgress.js, and MsgComposeCommands.js

Categories

(SeaMonkey :: UI Design, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: schapel, Assigned: jag+mozilla)

Details

(Keywords: perf)

Attachments

(1 file, 1 obsolete file)

This line of code is repeated in the three source files printProgress.js,
sendProgress.js, and MsgComposeCommands.js:

    percent = parseInt( (aCurTotalProgress*100)/aMaxTotalProgress + .5 );

This can be replaced with:

    percent = Math.round( (aCurTotalProgress*100)/aMaxTotalProgress );

which is faster and easier to read.
-> XP Apps
Assignee: asa → jaggernaut
Component: Browser-General → XP Apps
QA Contact: asa → paw
Blocks: patchmaker
Attached patch patch (obsolete) — Splinter Review
Apply changes as suggested.
Attachment #120875 - Attachment is obsolete: true
Attachment #120882 - Flags: review?(jaggernaut)
Attachment #120882 - Flags: superreview?(bryner)
Attachment #120882 - Flags: review?(jaggernaut)
Attachment #120882 - Flags: review+
Attachment #120882 - Flags: superreview?(bryner) → superreview+
Attachment #120882 - Flags: approval1.4b?
Comment on attachment 120882 [details] [diff] [review]
A file was missing

a=asa (on behalf of drivers) for checkin to 1.4beta.
Attachment #120882 - Flags: approval1.4b? → approval1.4b+
Checked in.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
No longer blocks: patchmaker
Product: Core → Mozilla Application Suite
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: