diff options
author | Zufu Liu <unknown> | 2024-01-27 19:51:31 +1100 |
---|---|---|
committer | Zufu Liu <unknown> | 2024-01-27 19:51:31 +1100 |
commit | 7e32149ab735019ad029c0559b99998b2d525053 (patch) | |
tree | 79c43d3b45eb7f2b4d5f23a81bbb96e133a0cb42 /src/CellBuffer.cxx | |
parent | 2ca7a15a1bd45d306775b2757ee17884f2c14320 (diff) | |
download | scintilla-mirror-7e32149ab735019ad029c0559b99998b2d525053.tar.gz |
Feature [feature-requests:#1458] Reduce memory used for undo actions.
Diffstat (limited to 'src/CellBuffer.cxx')
-rw-r--r-- | src/CellBuffer.cxx | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/CellBuffer.cxx b/src/CellBuffer.cxx index 32cc9d730..575aae584 100644 --- a/src/CellBuffer.cxx +++ b/src/CellBuffer.cxx @@ -329,23 +329,18 @@ public: } }; -Action::Action() noexcept { - at = ActionType::start; - position = 0; - lenData = 0; - mayCoalesce = false; -} +Action::Action() noexcept = default; void Action::Create(ActionType at_, Sci::Position position_, const char *data_, Sci::Position lenData_, bool mayCoalesce_) { - data = nullptr; position = position_; at = at_; + mayCoalesce = mayCoalesce_; + lenData = lenData_; + data = nullptr; if (lenData_) { data = std::make_unique<char[]>(lenData_); memcpy(&data[0], data_, lenData_); } - lenData = lenData_; - mayCoalesce = mayCoalesce_; } void Action::Clear() noexcept { |