diff options
| author | Michael Bebenita <[email protected]> | 2010-07-27 23:51:04 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-07-28 20:30:28 -0700 |
| commit | 17fa6bfd9a36136b1610324349e15d9b42748ca3 (patch) | |
| tree | c5728e74f0aa1db3326800f840542ff7c99fd20d /src/rt/circular_buffer.h | |
| parent | Make circular buffer use only power-of-two sizes, cheaper arithmetic. (diff) | |
| download | rust-17fa6bfd9a36136b1610324349e15d9b42748ca3.tar.xz rust-17fa6bfd9a36136b1610324349e15d9b42748ca3.zip | |
Change _unit_sz to unit_sz and make public in circular_buffer.
Diffstat (limited to 'src/rt/circular_buffer.h')
| -rw-r--r-- | src/rt/circular_buffer.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/rt/circular_buffer.h b/src/rt/circular_buffer.h index 3d11b37f..dc4160d8 100644 --- a/src/rt/circular_buffer.h +++ b/src/rt/circular_buffer.h @@ -12,6 +12,8 @@ circular_buffer : public dom_owned<circular_buffer> { public: rust_dom *dom; + // Size of the data unit in bytes. + const size_t unit_sz; circular_buffer(rust_dom *dom, size_t unit_sz); ~circular_buffer(); void transfer(void *dst); @@ -25,9 +27,6 @@ private: // (x & (_buffer_sz - 1)). size_t _buffer_sz; - // Size of the data unit in bytes. - size_t _unit_sz; - // Byte offset within the buffer where to read the next unit of data. size_t _next; |