Simplify some testlib set_limit methods
@@ -290,8 +290,7 @@ int test_main(int argc, char** argv, proc* tests, proc* benches) {
// WUFFS_BASE_HEADER_H is where wuffs_base__io_buffer is defined.
#ifdef WUFFS_BASE_HEADER_H
-static inline wuffs_base__empty_struct wuffs_base__io_reader__set_limit(
- wuffs_base__io_reader* o,
+void wuffs_base__io_reader__set_limit(wuffs_base__io_reader* o,
uint64_t limit) {
if (o && o->private_impl.buf) {
uint8_t* p = o->private_impl.buf->ptr + o->private_impl.buf->ri;
@@ -304,11 +303,9 @@ static inline wuffs_base__empty_struct wuffs_base__io_reader__set_limit(
o->private_impl.bounds[1] = p + limit;
}
}
- return ((wuffs_base__empty_struct){});
}
-static inline wuffs_base__empty_struct wuffs_base__io_writer__set_limit(
- wuffs_base__io_writer* o,
+void wuffs_base__io_writer__set_limit(wuffs_base__io_writer* o,
uint64_t limit) {
if (o && o->private_impl.buf) {
uint8_t* p = o->private_impl.buf->ptr + o->private_impl.buf->wi;
@@ -321,7 +318,6 @@ static inline wuffs_base__empty_struct wuffs_base__io_writer__set_limit(
o->private_impl.bounds[1] = p + limit;
}
}
- return ((wuffs_base__empty_struct){});
}
bool read_file(wuffs_base__io_buffer* dst, const char* path) {
