-// 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
void MEDCouplingRefCountServant::UnRegister()
{
if(_cpp_pointer)
- ((RefCountObject *)_cpp_pointer)->decrRef();
+ const_cast<RefCountObject *>(_cpp_pointer)->decrRef();
_ref_counter--;
if(_ref_counter<=0)
{