Fix win32 somewhat?

This commit is contained in:
2025-04-16 07:47:01 -05:00
parent fefec83b7e
commit bcd3ca9ff8
11 changed files with 20 additions and 39 deletions

View File

@@ -30,12 +30,9 @@ namespace Tesses::Framework::Streams {
size_t BufferedStream::Read(uint8_t* buff, size_t sz)
{
if(this->offset < this->read)
{
#if defined(_WIN32)
sz = min(sz,this->read-this->offset);
#else
{
sz = std::min(sz,this->read-this->offset);
#endif
memcpy(buff, this->buffer+this->offset, sz);
this->offset+=sz;
return sz;
@@ -44,11 +41,9 @@ namespace Tesses::Framework::Streams {
{
this->read = this->strm->Read(this->buffer, this->bufferSize);
this->offset=0;
#if defined(_WIN32)
sz = min(sz,this->read-this->offset);
#else
sz = std::min(sz,this->read-this->offset);
#endif
memcpy(buff, this->buffer+this->offset, sz);
this->offset+=sz;
return sz;