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

Jochen Nitschke j.nitschke+logerrit at ok.de
Sat Sep 17 15:02:12 UTC 2016


 include/o3tl/typed_flags_set.hxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2aa61f07eccd3749d9e9f4a02f2e642bb03cad55
Author: Jochen Nitschke <j.nitschke+logerrit at ok.de>
Date:   Sat Sep 17 14:48:11 2016 +0200

    fix warning in windows debug build
    
    > o3tl/typed_flags_set.hxx(82) : warning C4309: ´static_cast´ :
    >                                truncation of constant value
    
    
    
    Change-Id: I396b68e47d682ffe90ba3afb2ebf846cf100e20c
    Reviewed-on: https://gerrit.libreoffice.org/28977
    Reviewed-by: Jochen Nitschke <j.nitschke+logerrit at ok.de>
    Tested-by: Jochen Nitschke <j.nitschke+logerrit at ok.de>

diff --git a/include/o3tl/typed_flags_set.hxx b/include/o3tl/typed_flags_set.hxx
index e3ca014..637fcfa 100644
--- a/include/o3tl/typed_flags_set.hxx
+++ b/include/o3tl/typed_flags_set.hxx
@@ -80,7 +80,7 @@ struct is_typed_flags {
 #if !HAVE_CXX11_CONSTEXPR || HAVE_CXX14_CONSTEXPR
             assert(detail::isNonNegative(value));
             assert(
-                static_cast<typename std::underlying_type<E>::type>(~M) == 0
+                static_cast<typename std::underlying_type<E>::type>(~0) == M
                     // avoid "operands don't affect result" warnings when M
                     // covers all bits of the underlying type
                 || (value & ~M) == 0);


More information about the Libreoffice-commits mailing list