Closed Bug 1259182 Opened 4 years ago Closed 4 years ago

Shrink keyCodeData

Categories

(Core :: XBL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla48
Tracking Status
firefox48 --- fixed

People

(Reporter: njn, Assigned: njn)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

We can shrink keyCodeData for a tiny win.
uint8_t would actually be enough for both of the changed fields, but due to the
|char*| uint16_t results in the same value for sizeof(keyCodeData).
Attachment #8734038 - Flags: review?(bzbarsky)
Comment on attachment 8734038 [details] [diff] [review]
Shrink keyCodeData

r=me, though some static_asserts about the relevant sizeof and keycode values fitting in 16 bits would be good.
Attachment #8734038 - Flags: review?(bzbarsky) → review+
> r=me, though some static_asserts about the relevant sizeof and keycode
> values fitting in 16 bits would be good.

I checked -- GCC errors if either of the fields is ever assigned a value that's too large.
Blocks: 1254777
https://hg.mozilla.org/mozilla-central/rev/050be20c329f
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in before you can comment on or make changes to this bug.