Fix trimming whitespace from Doxygen comments.
Also trim the string (making it empty) if it consists solely of whitespace.
This commit is contained in:
parent
6fe4c0707b
commit
45ecc9cb84
2 changed files with 4 additions and 2 deletions
|
|
@ -45,7 +45,7 @@ may be specified."""
|
||||||
)
|
)
|
||||||
|
|
||||||
commentVerifier.check(doxygen_misc_constructs.getConnection.__doc__,
|
commentVerifier.check(doxygen_misc_constructs.getConnection.__doc__,
|
||||||
r"""
|
r"""
|
||||||
|
|
||||||
This function returns connection id."""
|
This function returns connection id."""
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -117,7 +117,9 @@ static size_t determineIndent(const string& s)
|
||||||
static void trimWhitespace(string& s)
|
static void trimWhitespace(string& s)
|
||||||
{
|
{
|
||||||
const size_t lastNonSpace = s.find_last_not_of(' ');
|
const size_t lastNonSpace = s.find_last_not_of(' ');
|
||||||
if (lastNonSpace != string::npos)
|
if (lastNonSpace == string::npos)
|
||||||
|
s.clear();
|
||||||
|
else
|
||||||
s.erase(lastNonSpace + 1);
|
s.erase(lastNonSpace + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue