diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/perf/decperf.cxx | 7 | ||||
-rw-r--r-- | tests/perf/encperf.cxx | 7 |
2 files changed, 4 insertions, 10 deletions
diff --git a/tests/perf/decperf.cxx b/tests/perf/decperf.cxx index 687ac7a9..e1307070 100644 --- a/tests/perf/decperf.cxx +++ b/tests/perf/decperf.cxx @@ -52,7 +52,7 @@ public: virtual void flush(); private: - virtual size_t overrun(size_t itemSize, size_t nItems); + virtual void overrun(size_t needed); int offset; rdr::U8 buf[131072]; @@ -99,12 +99,9 @@ void DummyOutStream::flush() ptr = buf; } -size_t DummyOutStream::overrun(size_t itemSize, size_t nItems) +void DummyOutStream::overrun(size_t needed) { flush(); - if (itemSize * nItems > avail()) - nItems = avail() / itemSize; - return nItems; } CConn::CConn(const char *filename) diff --git a/tests/perf/encperf.cxx b/tests/perf/encperf.cxx index 4665346f..6bcb6f74 100644 --- a/tests/perf/encperf.cxx +++ b/tests/perf/encperf.cxx @@ -76,7 +76,7 @@ public: virtual void flush(); private: - virtual size_t overrun(size_t itemSize, size_t nItems); + virtual void overrun(size_t needed); int offset; rdr::U8 buf[131072]; @@ -156,12 +156,9 @@ void DummyOutStream::flush() ptr = buf; } -size_t DummyOutStream::overrun(size_t itemSize, size_t nItems) +void DummyOutStream::overrun(size_t needed) { flush(); - if (itemSize * nItems > avail()) - nItems = avail() / itemSize; - return nItems; } CConn::CConn(const char *filename) |