Salome HOME
OK thanks to INV !
[modules/med.git] / src / MEDCouplingCorba / MEDCouplingRefCountServant.cxx
index d5c8a61caab8edaa7f88ff6fe43074c2af2304dd..5bd57e1a89da11fb310d02bfa08f043f49d28771 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2013  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -84,7 +84,7 @@ void MEDCouplingRefCountServant::Register()
 void MEDCouplingRefCountServant::UnRegister()
 {
   if(_cpp_pointer)
-    ((RefCountObject *)_cpp_pointer)->decrRef();
+    const_cast<RefCountObject *>(_cpp_pointer)->decrRef();
   _ref_counter--;
   if(_ref_counter<=0)
     {