[Libreoffice-commits] core.git: include/oox

Mike Kaganski mike.kaganski at collabora.com
Mon Sep 11 07:22:49 UTC 2017


 include/oox/export/utils.hxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit f0809a84b6c85a254bc23c5f55f86116d14a145d
Author: Mike Kaganski <mike.kaganski at collabora.com>
Date:   Mon Sep 11 09:15:46 2017 +0300

    include/oox/export/utils.hxx: make functions constexpr
    
    Change-Id: I7606b54fb7cef831c3f9a8580260aa880c7f4db4
    Reviewed-on: https://gerrit.libreoffice.org/42149
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/include/oox/export/utils.hxx b/include/oox/export/utils.hxx
index d94d6c4228ae..927987115a60 100644
--- a/include/oox/export/utils.hxx
+++ b/include/oox/export/utils.hxx
@@ -34,7 +34,7 @@ inline OString I64S_(sal_Int64 x) { return OString::number(x); }
  * @return const char* literal "true" for true value, or literal "false"
  *         for false value.
  */
-static inline const char* ToPsz(bool b)
+static constexpr const char* ToPsz(bool b)
 {
     return b ? "true" : "false";
 }
@@ -42,7 +42,7 @@ static inline const char* ToPsz(bool b)
 /**
  * @return literal "1" for true value, or literal "0" for false value.
  */
-static inline const char* ToPsz10(bool b)
+static constexpr const char* ToPsz10(bool b)
 {
     // xlsx seems to use "1" or "0" for boolean values.  I wonder it ever uses
     // the "true" "false" variant.
@@ -51,12 +51,12 @@ static inline const char* ToPsz10(bool b)
 
 #define USS(x) OUStringToOString( x, RTL_TEXTENCODING_UTF8 ).getStr()
 
-static inline sal_Int64 PPTtoEMU( sal_Int32 nPPT )
+static constexpr sal_Int64 PPTtoEMU( sal_Int32 nPPT )
 {
     return (sal_Int64)( (double)nPPT * 1587.5 );
 }
 
-static inline sal_Int64 TwipsToEMU( sal_Int32 nTwips )
+static constexpr sal_Int64 TwipsToEMU( sal_Int32 nTwips )
 {
     return sal_Int64( nTwips ) * 635;
 }


More information about the Libreoffice-commits mailing list