aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2024-12-02 19:38:38 +1100
committerNeil <nyamatongwe@gmail.com>2024-12-02 19:38:38 +1100
commitb3038de3e52df9a5fef52ab3f3a78573d2bf8c1d (patch)
tree9bb37206f0172157f68a1d9576f2ba149853a974
parent349c44dbd037cb881444fdef48f2a1621692738e (diff)
downloadscintilla-mirror-b3038de3e52df9a5fef52ab3f3a78573d2bf8c1d.tar.gz
Remove explicit initialization which is identical to default initialization.
Remove constructor argument which is same as default. Shorten code and avoid else.
-rw-r--r--src/RunStyles.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/RunStyles.cxx b/src/RunStyles.cxx
index 5985bc960..b1177f3b7 100644
--- a/src/RunStyles.cxx
+++ b/src/RunStyles.cxx
@@ -80,8 +80,6 @@ void RunStyles<DISTANCE, STYLE>::RemoveRunIfSameAsPrevious(DISTANCE run) {
template <typename DISTANCE, typename STYLE>
RunStyles<DISTANCE, STYLE>::RunStyles() {
- starts = Partitioning<DISTANCE>(8);
- styles = SplitVector<STYLE>();
styles.InsertValue(0, 2, 0);
}
@@ -172,9 +170,8 @@ FillResult<DISTANCE> RunStyles<DISTANCE, STYLE>::FillRange(DISTANCE position, ST
runEnd = RunFromPosition(end);
RemoveRunIfEmpty(runEnd);
return result;
- } else {
- return resultNoChange;
}
+ return resultNoChange;
}
template <typename DISTANCE, typename STYLE>
@@ -213,7 +210,7 @@ void RunStyles<DISTANCE, STYLE>::InsertSpace(DISTANCE position, DISTANCE insertL
template <typename DISTANCE, typename STYLE>
void RunStyles<DISTANCE, STYLE>::DeleteAll() {
- starts = Partitioning<DISTANCE>(8);
+ starts = Partitioning<DISTANCE>();
styles = SplitVector<STYLE>();
styles.InsertValue(0, 2, 0);
}