[glom] Remove redundant const_cast<>.



commit d5dc5eae40110f60db2ea2fd26ad53b63ee319a1
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Mar 15 08:37:49 2016 +0100

    Remove redundant const_cast<>.
    
    Noticed by the IntelliJ CLion inspections

 glom/libglom/data_structure/field.cc               |    2 +-
 .../libglom/python_embed/pygdavalue_conversions.cc |    2 +-
 glom/utility_widgets/imageglom.cc                  |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/glom/libglom/data_structure/field.cc b/glom/libglom/data_structure/field.cc
index 4e9a96c..575a32b 100644
--- a/glom/libglom/data_structure/field.cc
+++ b/glom/libglom/data_structure/field.cc
@@ -300,7 +300,7 @@ Glib::ustring Field::to_file_format(const Gnome::Gda::Value& value, glom_field_t
         return Glib::ustring();
       else
       {
-        if(!gda_blob_op_read_all(const_cast<GdaBlobOp*>(gdablob->op), const_cast<GdaBlob*>(gdablob)))
+        if(!gda_blob_op_read_all(gdablob->op, const_cast<GdaBlob*>(gdablob)))
         {
           return Glib::ustring();
         }
diff --git a/glom/libglom/python_embed/pygdavalue_conversions.cc 
b/glom/libglom/python_embed/pygdavalue_conversions.cc
index 84c0726..58ada62 100644
--- a/glom/libglom/python_embed/pygdavalue_conversions.cc
+++ b/glom/libglom/python_embed/pygdavalue_conversions.cc
@@ -208,7 +208,7 @@ boost::python::object glom_pygda_value_as_boost_pyobject(const Glib::ValueBase&
         const auto gdablob = gda_value_get_blob (boxed);
         if(gdablob && gdablob->op)
         {
-          if(gda_blob_op_read_all(const_cast<GdaBlobOp*>(gdablob->op), const_cast<GdaBlob*>(gdablob)))
+          if(gda_blob_op_read_all(gdablob->op, const_cast<GdaBlob*>(gdablob)))
           {
             ret = boost::python::object((const char*)gdablob->data.data); /* TODO: Use the size. TODO: Check 
for null GdaBinary. */
           }
diff --git a/glom/utility_widgets/imageglom.cc b/glom/utility_widgets/imageglom.cc
index 5374ae8..1aca071 100644
--- a/glom/utility_widgets/imageglom.cc
+++ b/glom/utility_widgets/imageglom.cc
@@ -293,7 +293,7 @@ const GdaBinary* ImageGlom::get_binary() const
   else if(m_original_data.get_value_type() == GDA_TYPE_BLOB)
   {
     const auto gda_blob = gda_value_get_blob(m_original_data.gobj());
-    if(gda_blob && gda_blob_op_read_all(const_cast<GdaBlobOp*>(gda_blob->op), 
const_cast<GdaBlob*>(gda_blob)))
+    if(gda_blob && gda_blob_op_read_all(gda_blob->op, const_cast<GdaBlob*>(gda_blob)))
       gda_binary = &(gda_blob->data);
   }
   


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