aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/UndoHistory.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/UndoHistory.h')
-rw-r--r--src/UndoHistory.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/UndoHistory.h b/src/UndoHistory.h
index 90b2860a7..8de636f8d 100644
--- a/src/UndoHistory.h
+++ b/src/UndoHistory.h
@@ -15,9 +15,13 @@ namespace Scintilla::Internal {
// only use 2 bytes or even 1 byte for each length.
// This saves much memory often reducing by 50% for 32-bit builds and 75% for 64-bit builds.
+struct SizeMax {
+ size_t size = 1;
+ size_t maxValue = UINT8_MAX;
+};
+
class ScaledVector {
- size_t elementSize = 1;
- size_t elementMax = 255;
+ SizeMax element;
std::vector<uint8_t> bytes;
public:
[[nodiscard]] size_t Size() const noexcept;