Closed Bug 1295920 Opened 8 years ago Closed 8 years ago

Replace enum with enum class in PlatformDecoderModule.h

Categories

(Core :: Audio/Video: Playback, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla51
Tracking Status
firefox51 --- fixed

People

(Reporter: JamesCheng, Assigned: JamesCheng)

References

Details

Attachments

(1 file)

Use enum class instead of enum for memory saving.
How does enum class save more memory than enum?
(In reply to JW Wang [:jwwang] from comment #2)
> How does enum class save more memory than enum?
More specifically,
using enum class : uint8_t instead of enum (integer) to save memory.
Another reason is using strong type |enum class| is more encouraged.
The memory saving (which is quite insignificant unless they are stored in an array) doesn't justify this bug as much as strong typing.
Comment on attachment 8781933 [details]
Bug 1295920 - Replace enum with enum class in PlatformDecoderModule.h.

https://reviewboard.mozilla.org/r/72248/#review70090

Assuming it all compiles on all platform of course...
Attachment #8781933 - Flags: review?(jyavenard) → review+
Thanks for reviewing.

It can be compiled in all platforms.
https://treeherder.mozilla.org/#/jobs?repo=try&revision=d2037ad7fcb1
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/82cacf7d008a
Replace enum with enum class in PlatformDecoderModule.h. r=jya
Keywords: checkin-needed
Blocks: 1296295
https://hg.mozilla.org/mozilla-central/rev/82cacf7d008a
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: