From afbc049cc91e91bbd8f50586fdfb3ce874d3f91e Mon Sep 17 00:00:00 2001 From: Christopher Pascoe Date: Wed, 9 Dec 2015 22:51:57 -0800 Subject: [PATCH] Make the circular buffer's _size and _bufend members immutable. --- cores/esp8266/cbuf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cores/esp8266/cbuf.h b/cores/esp8266/cbuf.h index 087e7200b..02b612c5c 100644 --- a/cores/esp8266/cbuf.h +++ b/cores/esp8266/cbuf.h @@ -113,9 +113,9 @@ class cbuf { return (ptr == _bufend) ? _buf : ptr; } - size_t _size; + const size_t _size; char* _buf; - char* _bufend; + const char* const _bufend; char* _begin; char* _end; };