Closed Bug 207542 Opened 17 years ago Closed 17 years ago

better constness in intl

Categories

(Core :: Internationalization, defect, trivial)

defect
Not set
trivial

Tracking

()

RESOLVED FIXED

People

(Reporter: ataylor, Assigned: ataylor)

References

(Blocks 1 open bug)

Details

(Keywords: memory-footprint)

Attachments

(1 file)

There are a number of variables in mozilla/intl that could be made const. 
Making them const allows some optimizations not otherwise available, such as
sharing more data between multiple running instances.
yay! so glad to see more of these bugs :)
Here is a patch that constifies some variables in intl.  Interestingly, the
file  intl/chardet/src/nsCyrillicClass.h is automatically generated by
GenCyrllicClass.cpp which already outputs static const variables, but the copy
in CVS has only static variables.

This patch fixes that, as well as updating some method signatures to avoid
"casting away const" type warnings.  All told, it makes about 1k of data const.
Comment on attachment 124481 [details] [diff] [review]
constifies some variables in intl
[Checkin: Comment 4]

nice! sr=alecf
Attachment #124481 - Flags: superreview+
Attachment #124481 - Flags: review?(bz-bugspam)
Attachment #124481 - Flags: review?(bz-bugspam) → review+
Checked in to the 1.5a trunk.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Blocks: 74803
Flags: in-testsuite-
Attachment #124481 - Attachment description: constifies some variables in intl → constifies some variables in intl [Checkin: Comment 4]
You need to log in before you can comment on or make changes to this bug.