aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/RunStyles.h
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2022-07-29 10:16:34 +1000
committerNeil <nyamatongwe@gmail.com>2022-07-29 10:16:34 +1000
commitcb3ef02e9c483596f3c146bc72325457e61d0b19 (patch)
treeef80dee71ea9af538e7bf7ec4bc8ac1592a506ea /src/RunStyles.h
parent5218b62655b877af64f9980efa668a1dcb82ed43 (diff)
downloadscintilla-mirror-cb3ef02e9c483596f3c146bc72325457e61d0b19.tar.gz
Flatten Partitioning and RunStyles to avoid a level of indirection by containing
SplitVector and Partitioning directly instead of using std::unique_ptr. This will enable more value semantics and reduces potential memory allocation failure scenarios.
Diffstat (limited to 'src/RunStyles.h')
-rw-r--r--src/RunStyles.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/RunStyles.h b/src/RunStyles.h
index 328fa1d4d..76d75d75a 100644
--- a/src/RunStyles.h
+++ b/src/RunStyles.h
@@ -25,8 +25,8 @@ struct FillResult {
template <typename DISTANCE, typename STYLE>
class RunStyles {
private:
- std::unique_ptr<Partitioning<DISTANCE>> starts;
- std::unique_ptr<SplitVector<STYLE>> styles;
+ Partitioning<DISTANCE> starts;
+ SplitVector<STYLE> styles;
DISTANCE RunFromPosition(DISTANCE position) const noexcept;
DISTANCE SplitRun(DISTANCE position);
void RemoveRun(DISTANCE run);