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

RESOLVED FIXED

Status

--
minor
RESOLVED FIXED
16 years ago
14 years ago

People

(Reporter: schapel, Assigned: jag-mozilla)

Tracking

({perf})

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

2.24 KB, patch
jag-mozilla
: review+
bryner
: superreview+
Details | Diff | Splinter Review
(Reporter)

Description

16 years ago
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.
(Reporter)

Comment 1

16 years ago
-> XP Apps
Assignee: asa → jaggernaut
Component: Browser-General → XP Apps
QA Contact: asa → paw
(Reporter)

Updated

16 years ago
Blocks: 104624

Comment 2

16 years ago
Created attachment 120875 [details] [diff] [review]
patch

Apply changes as suggested.

Comment 3

16 years ago
Created attachment 120882 [details] [diff] [review]
A file was missing
Attachment #120875 - Attachment is obsolete: true

Updated

16 years ago
Attachment #120882 - Flags: review?(jaggernaut)
(Assignee)

Updated

16 years ago
Attachment #120882 - Flags: superreview?(bryner)
Attachment #120882 - Flags: review?(jaggernaut)
Attachment #120882 - Flags: review+
Attachment #120882 - Flags: superreview?(bryner) → superreview+
(Assignee)

Updated

16 years ago
Attachment #120882 - Flags: approval1.4b?

Comment 4

16 years ago
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+
(Assignee)

Comment 5

16 years ago
Checked in.
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED
(Reporter)

Updated

16 years ago
No longer blocks: 104624
Product: Core → Mozilla Application Suite
You need to log in before you can comment on or make changes to this bug.