From 2c99967c356c0065409a3da23de4f112d7cfd3ad Mon Sep 17 00:00:00 2001 From: agessaman Date: Mon, 26 Jan 2026 19:38:04 -0800 Subject: [PATCH] Refactor BufStream class in RegionMap.cpp to rename max variable for clarity Updated the variable name from _max to _max_size in the BufStream class to improve code readability and maintainability. This change ensures consistency in naming conventions within the class. --- src/helpers/RegionMap.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/helpers/RegionMap.cpp b/src/helpers/RegionMap.cpp index 4ff8233e..1283f026 100644 --- a/src/helpers/RegionMap.cpp +++ b/src/helpers/RegionMap.cpp @@ -7,12 +7,12 @@ class BufStream : public Stream { public: BufStream(char *buf, size_t max) - : _buf(buf), _max(max), _pos(0) { - if (_max > 0) _buf[0] = 0; + : _buf(buf), _max_size(max), _pos(0) { + if (_max_size > 0) _buf[0] = 0; } size_t write(uint8_t c) override { - if (_pos + 1 >= _max) return 0; + if (_pos + 1 >= _max_size) return 0; _buf[_pos++] = c; _buf[_pos] = 0; return 1; @@ -36,7 +36,7 @@ public: private: char *_buf; - size_t _max; + size_t _max_size; size_t _pos; };