Closed Bug 199791 Opened 22 years ago Closed 22 years ago

parseInt used instead of Math.floor in ChatZilla and Venkman utilities

Categories

(Other Applications Graveyard :: ChatZilla, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: schapel, Assigned: rginda)

Details

(Keywords: perf)

Attachments

(1 file)

In the chrome files extensions/venkman/resources/content/venkman-utils.js and extensions/irc/js/lib/utils.js the following lines appear: var seconds = roundTo(offset % 60, 2); var minutes = parseInt(offset / 60); var hours = parseInt(minutes / 60); minutes = minutes % 60; var days = parseInt(hours / 24); hours = hours % 24; The parseInt function calls should be replaced by calls to Math.floor instead. This will make the code faster and easier to read.
Blocks: patchmaker
.
Assignee: jaggernaut → rginda
Component: XP Apps → ChatZilla
QA Contact: paw → samuel
Attached patch patchSplinter Review
Change occurrences of parseInt() to Math.floor().
I've got these changes in my local tree, they'll show up in the next chatzila and venkman XPIs. There were a few other places in venkman-utils.js that I fixed as well.
Status: NEW → ASSIGNED
fixed
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
No longer blocks: patchmaker
Product: Core → Other Applications
Product: Other Applications → Other Applications Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: