cpp-common/bt2: add const_cast when setting user data
[babeltrace.git] / src / cpp-common / bt2 / self-message-iterator.hpp
index e333cb1a41587d62990ce0f4807198c0f551cf9c..4460fe27e79c422cc90f9f222147a4c48d96ae2b 100644 (file)
@@ -69,7 +69,8 @@ public:
     template <typename T>
     void data(T& obj) const noexcept
     {
-        bt_self_message_iterator_set_data(this->libObjPtr(), static_cast<void *>(&obj));
+        bt_self_message_iterator_set_data(this->libObjPtr(),
+                                          const_cast<void *>(static_cast<const void *>(&obj)));
     }
 
     bt2::StreamBeginningMessage::Shared
This page took 0.024888 seconds and 4 git commands to generate.