[glibmm] Glib::Value_Flags<>: static_cast to correct type



commit ddda427f6eb42aa3e4c499f2dbd0c9c3fe9d889b
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date:   Thu Jun 15 09:32:29 2017 +0200

    Glib::Value_Flags<>: static_cast to correct type
    
    Cast to the correct type in the call to ValueBase_Flags::set_flags().
    It takes an unsigned int.

 glib/glibmm/value.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/glib/glibmm/value.h b/glib/glibmm/value.h
index f2d3f30..142e187 100644
--- a/glib/glibmm/value.h
+++ b/glib/glibmm/value.h
@@ -344,7 +344,7 @@ class Value_Flags : public ValueBase_Flags
 public:
   using CppType = T;
 
-  void set(CppType data) { set_flags(static_cast<int>(data)); }
+  void set(CppType data) { set_flags(static_cast<unsigned int>(data)); }
   CppType get() const { return CppType(get_flags()); }
 };
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]