summaryrefslogtreecommitdiff
path: root/sax
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2019-10-12 11:17:42 +0200
committerJulien Nabet <serval2412@yahoo.fr>2019-10-12 12:59:28 +0200
commitad0bad298f33f0f530a3c797f777db1cdebad93b (patch)
tree9e86f6219d1dfbe3f12cee7abf9efbe3aa0751d1 /sax
parent57cfbc6830c3d8dc64107aed4a5555613415f069 (diff)
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@yahoo.fr>
Diffstat (limited to 'sax')
-rw-r--r--sax/source/tools/converter.cxx16
1 files changed, 3 insertions, 13 deletions
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 */