mirror of
https://github.com/libSDL2pp/libSDL2pp.git
synced 2025-08-05 11:56:00 -04:00
Fix variable types
This commit is contained in:
parent
29f9f28128
commit
9ecd4a12fe
@ -128,7 +128,7 @@ public:
|
|||||||
if (position_ + size > container_.size())
|
if (position_ + size > container_.size())
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
int toread = std::min((container_.size() - position_), maxnum * size);
|
size_t toread = std::min((container_.size() - position_), maxnum * size);
|
||||||
|
|
||||||
std::copy(container_.begin() + position_, container_.begin() + position_ + toread, reinterpret_cast<unsigned char*>(ptr));
|
std::copy(container_.begin() + position_, container_.begin() + position_ + toread, reinterpret_cast<unsigned char*>(ptr));
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ private:
|
|||||||
char* pos = static_cast<char*>(ptr);
|
char* pos = static_cast<char*>(ptr);
|
||||||
pos += nread;
|
pos += nread;
|
||||||
|
|
||||||
int count = nread % size;
|
size_t count = nread % size;
|
||||||
|
|
||||||
// put partially read object back into the stream
|
// put partially read object back into the stream
|
||||||
while (--count >= 0)
|
while (--count >= 0)
|
||||||
|
@ -46,7 +46,7 @@ int main() try {
|
|||||||
while (stream_pos < stream_end) {
|
while (stream_pos < stream_end) {
|
||||||
Uint8* wav_end = wav.GetBuffer() + wav.GetLength();
|
Uint8* wav_end = wav.GetBuffer() + wav.GetLength();
|
||||||
|
|
||||||
int copylen = std::min(wav_end - wav_pos, stream_end - stream_pos);
|
size_t copylen = std::min(wav_end - wav_pos, stream_end - stream_pos);
|
||||||
|
|
||||||
std::copy(wav_pos, wav_pos + copylen, stream_pos);
|
std::copy(wav_pos, wav_pos + copylen, stream_pos);
|
||||||
stream_pos += copylen;
|
stream_pos += copylen;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user