mirror of https://github.com/PrimeDecomp/prime.git
Improve COutputStream::WriteChar
This commit is contained in:
parent
16d013b419
commit
ef751ff69f
|
@ -40,12 +40,11 @@ public:
|
||||||
|
|
||||||
void WriteChar(u8 c) {
|
void WriteChar(u8 c) {
|
||||||
FlushShiftRegister();
|
FlushShiftRegister();
|
||||||
if (mBufLen <= mUnwrittenLen) {
|
if (mUnwrittenLen >= mBufLen) {
|
||||||
DoFlush();
|
DoFlush();
|
||||||
}
|
}
|
||||||
++mNumWrites;
|
++mNumWrites;
|
||||||
*(reinterpret_cast< u8* >(mBufPtr) + mUnwrittenLen) = c;
|
*(reinterpret_cast< u8* >(mBufPtr) + mUnwrittenLen++) = c;
|
||||||
++mUnwrittenLen;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -82,7 +81,7 @@ inline void coutput_stream_helper(const uint& t, COutputStream& out) {
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
inline void coutput_stream_helper(const bool& t, COutputStream& out) {
|
inline void coutput_stream_helper(const bool& t, COutputStream& out) {
|
||||||
out.WriteChar(static_cast< char >(t));
|
out.WriteChar(static_cast< u8 >(t));
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // _COUTPUTSTREAM
|
#endif // _COUTPUTSTREAM
|
||||||
|
|
Loading…
Reference in New Issue