diff options
author | Zufu Liu <unknown> | 2021-09-30 14:27:52 +1000 |
---|---|---|
committer | Zufu Liu <unknown> | 2021-09-30 14:27:52 +1000 |
commit | f0d7f6fbc880ed1b5db8fc9fc52bc7cd99d209a6 (patch) | |
tree | 66df4640d8af66a1aa4afd3a1eadd0d49e338c78 /src/Document.cxx | |
parent | 116e4d04fd01f81f2bfbd3a94abb58401f475c32 (diff) | |
download | scintilla-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.cxx | 4 |
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; |