aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Document.cxx
diff options
context:
space:
mode:
authorZufu Liu <unknown>2021-09-30 14:27:52 +1000
committerZufu Liu <unknown>2021-09-30 14:27:52 +1000
commitf0d7f6fbc880ed1b5db8fc9fc52bc7cd99d209a6 (patch)
tree66df4640d8af66a1aa4afd3a1eadd0d49e338c78 /src/Document.cxx
parent116e4d04fd01f81f2bfbd3a94abb58401f475c32 (diff)
downloadscintilla-mirror-f0d7f6fbc880ed1b5db8fc9fc52bc7cd99d209a6.tar.gz
Feature [feature-requests:#1416] Remove extra check that is never true and
remove parameter used just for this test.
Diffstat (limited to 'src/Document.cxx')
-rw-r--r--src/Document.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/Document.cxx b/src/Document.cxx
index 8baa84ad8..eae055dc2 100644
--- a/src/Document.cxx
+++ b/src/Document.cxx
@@ -1142,9 +1142,7 @@ static constexpr bool IsSpaceOrTab(int ch) noexcept {
// 2) Break before punctuation
// 3) Break after whole character
-int Document::SafeSegment(const char *text, int length, int lengthSegment) const noexcept {
- if (length <= lengthSegment)
- return length;
+int Document::SafeSegment(const char *text, int lengthSegment) const noexcept {
int lastSpaceBreak = -1;
int lastPunctuationBreak = -1;
int lastEncodingAllowedBreak = 0;