Fix const bug in getCppPtrFromC that was causing an infinite loop.

This commit is contained in:
Ghislain MARY 2018-02-12 17:48:33 +01:00
parent 589a0393b4
commit de13310b03

View file

@ -338,7 +338,7 @@ public:
typename = typename std::enable_if<IsDefinedBaseCppObject<CppType>::value, CppType>::type
>
static inline std::shared_ptr<const CppType> getCppPtrFromC (const CType *cObject) {
return getCppPtrFromC<CType, CppType>(const_cast<CType *>(cObject));
return getCppPtrFromC<typename std::remove_const<CType>::type, CppType>(const_cast<CType *>(cObject));
}
template<