diff options
author | Alex Turbov <i.zaufi@gmail.com> | 2022-08-23 07:21:32 (GMT) |
---|---|---|
committer | Alex Turbov <i.zaufi@gmail.com> | 2022-11-17 12:37:09 (GMT) |
commit | c802bfc548c82e13c916b7e14fc81daa1c733213 (patch) | |
tree | 7296a4fc9f0e9f04a512eace5e96b58d19602d44 /Source/cmDocumentationFormatter.cxx | |
parent | f27537ec3db3a53a83da9d9824f10f139397476e (diff) | |
download | CMake-c802bfc548c82e13c916b7e14fc81daa1c733213.zip CMake-c802bfc548c82e13c916b7e14fc81daa1c733213.tar.gz CMake-c802bfc548c82e13c916b7e14fc81daa1c733213.tar.bz2 |
cmDocumentationFormatter: Eliminate one `if` in the `PrintColumn` loop
Diffstat (limited to 'Source/cmDocumentationFormatter.cxx')
-rw-r--r-- | Source/cmDocumentationFormatter.cxx | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/Source/cmDocumentationFormatter.cxx b/Source/cmDocumentationFormatter.cxx index 85276fc..9d773e9 100644 --- a/Source/cmDocumentationFormatter.cxx +++ b/Source/cmDocumentationFormatter.cxx @@ -102,13 +102,8 @@ void cmDocumentationFormatter::PrintColumn(std::ostream& os, const char* text) if (column) { // Not first word on line. Separate from the previous word // by a space, or two if this is a new sentence. - if (newSentence) { - os << " "; - column += 2; - } else { - os << ' '; - column += 1; - } + os << &(" "[std::size_t(!newSentence)]); + column += 1u + std::ptrdiff_t(newSentence); } else if (!firstLine && this->TextIndent) { // First word on line. Print indentation unless this is the // first line. |