Open
Bug 1392177
Opened 7 years ago
Updated 2 years ago
Refactor ByteReader so it could return error.
Categories
(Core :: Audio/Video: Playback, enhancement, P3)
Core
Audio/Video: Playback
Tracking
()
NEW
People
(Reporter: ayang, Unassigned)
References
Details
Reporter | ||
Updated•7 years ago
|
The way ByteReader is supposed to work is using this pattern:
if (!byteReader.CanRead32())
return false;
uint32_t value = byteReader.ReadU32();
An optional type would avoid this kind of mistake:
if (!byteReader.CanRead16())
return false;
uint32_t value = byteReader.ReadU32();
But it would otherwise be pretty much open to the same mistake of forgetting the error check. Having said that, it is better from a type safety point of view.
Priority: -- → P3
Summary: Refactory ByteReader so it could return error. → Refactor ByteReader so it could return error.
Reporter | ||
Updated•7 years ago
|
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•