[Libreoffice-commits] core.git: sax/source
Julien Nabet (via logerrit)
logerrit at kemper.freedesktop.org
Sat Oct 12 11:00:41 UTC 2019
sax/source/tools/converter.cxx | 16 +++-------------
1 file changed, 3 insertions(+), 13 deletions(-)
New commits:
commit ad0bad298f33f0f530a3c797f777db1cdebad93b
Author: Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Sat Oct 12 11:17:42 2019 +0200
Commit: Julien Nabet <serval2412 at yahoo.fr>
CommitDate: Sat Oct 12 12:59:28 2019 +0200
No need to create functions for just returning "true" or "false"
Change-Id: I9c16047012675474bc2b58f33a65dd10d8aafbf6
Reviewed-on: https://gerrit.libreoffice.org/80711
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx
index 95bb262a846c..15f8abbde4e3 100644
--- a/sax/source/tools/converter.cxx
+++ b/sax/source/tools/converter.cxx
@@ -422,28 +422,18 @@ void Converter::convertMeasure( OUStringBuffer& rBuffer,
rBuffer.appendAscii( psUnit );
}
-static OUString getTrueString()
-{
- return "true";
-}
-
-static OUString getFalseString()
-{
- return "false";
-}
-
/** convert string to boolean */
bool Converter::convertBool( bool& rBool, const OUString& rString )
{
- rBool = rString == getTrueString();
+ rBool = rString == "true";
- return rBool || (rString == getFalseString());
+ return rBool || (rString == "false");
}
/** convert boolean to string */
void Converter::convertBool( OUStringBuffer& rBuffer, bool bValue )
{
- rBuffer.append( bValue ? getTrueString() : getFalseString() );
+ rBuffer.append( bValue );
}
/** convert string to percent */
More information about the Libreoffice-commits
mailing list