Bug 1763 – EndianStream doesn't handle ubyte/byte read/writes. Simple fix.

Status
RESOLVED
Resolution
FIXED
Severity
trivial
Priority
P2
Component
phobos
Product
D
Version
D1 (retired)
Platform
x86
OS
Linux
Creation time
2008-01-02T01:38:00Z
Last change time
2014-02-16T15:23:33Z
Assigned to
bugzilla
Creator
kede0309

Comments

Comment #0 by kede0309 — 2008-01-02T01:38:37Z
Hi, Can we add the following to EndianStream for completeness? void read(out byte x) { readExact(&x, x.sizeof); } void read(out ubyte x) { readExact(&x, x.sizeof); } void write(out byte x) { writeExact(&x, x.sizeof); } void write(out ubyte x) { writeExact(&x, x.sizeof); } otherwise code such as the following won't compile without a fudge: s = new EndianStream(stream); byte b; ubyte ub; s.read(b); s.read(ub); Keep up the good work. Scott
Comment #1 by bugzilla — 2008-09-03T01:39:29Z
Fixed dmd 1.035