Closed Bug 1259182 Opened 9 years ago Closed 9 years ago

Shrink keyCodeData

Categories

(Core :: XBL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla48
Tracking Status
firefox48 --- fixed

People

(Reporter: n.nethercote, Assigned: n.nethercote)

References

Details

Attachments

(1 file)

We can shrink keyCodeData for a tiny win.
Attached patch Shrink keyCodeData (deleted) — Splinter Review
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
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: