diff options
author | Jan Holesovsky <kendy@collabora.com> | 2014-04-14 16:41:15 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-04-14 16:43:28 +0200 |
commit | fabea153cfe1ed109d2724b873655c254a152a38 (patch) | |
tree | caba0653fcee9c67a0f147c1a9b85fcad0fb81bb /writerfilter/source | |
parent | f62b06eb1eeeed05306601d4736973fc16a17666 (diff) |
Compile the debugging strings in only if we are about to use them.
Saves us tons of string literals.
Change-Id: Ieb7ac52e7493d692e7ed56552350b8781ec6b500
Diffstat (limited to 'writerfilter/source')
-rw-r--r-- | writerfilter/source/ooxml/qnametostr.xsl | 2 | ||||
-rw-r--r-- | writerfilter/source/resourcemodel/qnametostrcore.cxx | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/writerfilter/source/ooxml/qnametostr.xsl b/writerfilter/source/ooxml/qnametostr.xsl index 5d09c8b245f2..cfcbad037f14 100644 --- a/writerfilter/source/ooxml/qnametostr.xsl +++ b/writerfilter/source/ooxml/qnametostr.xsl @@ -60,6 +60,7 @@ <xsl:text> void QNameToString::init_ooxml() { +#ifdef DEBUG_LOGGING /* ooxml */ </xsl:text> <xsl:for-each select="//@tokenid"> @@ -75,6 +76,7 @@ void QNameToString::init_ooxml() </xsl:if> </xsl:for-each> <xsl:text> +#endif } </xsl:text> </xsl:template> diff --git a/writerfilter/source/resourcemodel/qnametostrcore.cxx b/writerfilter/source/resourcemodel/qnametostrcore.cxx index 9f5d970304a2..a4737533971c 100644 --- a/writerfilter/source/resourcemodel/qnametostrcore.cxx +++ b/writerfilter/source/resourcemodel/qnametostrcore.cxx @@ -33,14 +33,12 @@ QNameToString::Pointer_t QNameToString::Instance() string QNameToString::operator()(Id qName) { - string sResult; - Map::const_iterator aIt = mMap.find(qName); if (aIt != mMap.end()) - sResult = aIt->second; + return aIt->second; - return mMap[qName]; + return string(); } QNameToString::QNameToString() |