mirror of
https://github.com/PrimeDecomp/prime.git
synced 2025-07-06 17:15:52 +00:00
Improve COutputStream::WriteChar
Former-commit-id: ef751ff69f7091b6fccc4bf57ce186b2b48b5fc4
This commit is contained in:
parent
58d095dcd4
commit
08804f22b8
@ -40,12 +40,11 @@ public:
|
||||
|
||||
void WriteChar(u8 c) {
|
||||
FlushShiftRegister();
|
||||
if (mBufLen <= mUnwrittenLen) {
|
||||
if (mUnwrittenLen >= mBufLen) {
|
||||
DoFlush();
|
||||
}
|
||||
++mNumWrites;
|
||||
*(reinterpret_cast< u8* >(mBufPtr) + mUnwrittenLen) = c;
|
||||
++mUnwrittenLen;
|
||||
*(reinterpret_cast< u8* >(mBufPtr) + mUnwrittenLen++) = c;
|
||||
}
|
||||
|
||||
|
||||
@ -82,7 +81,7 @@ inline void coutput_stream_helper(const uint& t, COutputStream& out) {
|
||||
|
||||
template <>
|
||||
inline void coutput_stream_helper(const bool& t, COutputStream& out) {
|
||||
out.WriteChar(static_cast< char >(t));
|
||||
out.WriteChar(static_cast< u8 >(t));
|
||||
}
|
||||
|
||||
#endif // _COUTPUTSTREAM
|
||||
|
Loading…
x
Reference in New Issue
Block a user