mirror of
https://github.com/libSDL2pp/libSDL2pp.git
synced 2025-08-04 03:15:59 -04:00
Fix argument name for Write()
This commit is contained in:
parent
7123b32217
commit
927f812d43
@ -90,13 +90,13 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <class SS>
|
template <class SS>
|
||||||
typename std::enable_if<std::is_base_of<std::ostream, SS>::value, size_t>::type WriteHelper(const void* ptr, size_t size, size_t maxnum) {
|
typename std::enable_if<std::is_base_of<std::ostream, SS>::value, size_t>::type WriteHelper(const void* ptr, size_t size, size_t num) {
|
||||||
stream_.write(static_cast<const char*>(ptr), size * maxnum);
|
stream_.write(static_cast<const char*>(ptr), size * num);
|
||||||
// XXX: there seem to be no reliable way to tell how much
|
// XXX: there seem to be no reliable way to tell how much
|
||||||
// was actually written
|
// was actually written
|
||||||
if (stream_.rdstate() & std::ios_base::badbit)
|
if (stream_.rdstate() & std::ios_base::badbit)
|
||||||
return 0;
|
return 0;
|
||||||
return maxnum;
|
return num;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class SS>
|
template <class SS>
|
||||||
@ -140,8 +140,8 @@ public:
|
|||||||
return ReadHelper<S>(ptr, size, maxnum);
|
return ReadHelper<S>(ptr, size, maxnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual size_t Write(const void* ptr, size_t size, size_t maxnum) override {
|
virtual size_t Write(const void* ptr, size_t size, size_t num) override {
|
||||||
return WriteHelper<S>(ptr, size, maxnum);
|
return WriteHelper<S>(ptr, size, num);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual int Close() override {
|
virtual int Close() override {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user