[Libreoffice-commits] core.git: sal/osl

Caolán McNamara caolanm at redhat.com
Mon Mar 2 03:02:55 PST 2015


 sal/osl/all/log.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 749c336d305040a374b406327b1c1b303e810983
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Mar 2 11:01:03 2015 +0000

    V804: Decreased performance
    
    Change-Id: I53c2d11e81edb3f6d00984b3dc90994af5765164

diff --git a/sal/osl/all/log.cxx b/sal/osl/all/log.cxx
index aa3105d..67e384c 100644
--- a/sal/osl/all/log.cxx
+++ b/sal/osl/all/log.cxx
@@ -194,9 +194,10 @@ void log(
     if (level == SAL_DETAIL_LOG_LEVEL_DEBUG) {
         s << ' ';
     } else {
+        const size_t nStrLen(std::strlen(SRCDIR "/"));
         s << (where
-              + (std::strncmp(where, SRCDIR "/", std::strlen(SRCDIR "/")) == 0
-                 ? std::strlen(SRCDIR "/") : 0));
+              + (std::strncmp(where, SRCDIR "/", nStrLen) == 0
+                 ? nStrLen : 0));
     }
     s << message << '\n';
 #if defined ANDROID


More information about the Libreoffice-commits mailing list