DGtal-team / DGtal

Digital Geometry Tools and Algorithm Library
https://dgtal.org
GNU Lesser General Public License v3.0
370 stars 115 forks source link

errors in smart pointers #773

Closed troussil closed 10 years ago

troussil commented 10 years ago

After playing with smart pointers, I found the following errors:

DGtal/src/DGtal/base/CowPtr.ih:66:19: error: no member named 'isValid' in 'Adaptee' return myPtr->isValid();

I think it should be myPtr.isValid()

DGtal/src/DGtal/base/CountedPtrOrPtr.h:114:37: error: no member named 'myCounter' in 'DGtal::CountedPtrOrPtr' if ( r.myIsCountedPtr ) acquire( r.myCounter );

I think it should be r.myAny with the appropriate cast

More generally, classes of smart pointers should be documented following DGtal conventions (I can do it if you want).

JacquesOlivierLachaud commented 10 years ago

Yep. You are right. Seems like a bad copy/paste. And yes for the second remark.

After playing with smart pointers, I found the following errors:

DGtal/src/DGtal/base/CowPtr.ih:66:19: error: no member named 'isValid' in 'Adaptee' return myPtr->isValid();

I think it should be myPtr.isValid()

DGtal/src/DGtal/base/CountedPtrOrPtr.h:114:37: error: no member named 'myCounter' in 'DGtal::CountedPtrOrPtr' if ( r.myIsCountedPtr ) acquire( r.myCounter );

I think it should be r.myAny with the appropriate cast

More generally, classes of smart pointers should be documented
following DGtal conventions (I can do it if you want).


Reply to this email directly or view it on GitHub: https://github.com/DGtal-team/DGtal/issues/773

troussil commented 10 years ago

Another issue #774 is related to smart pointers

dcoeurjo commented 10 years ago

is this issue still active ?

JacquesOlivierLachaud commented 10 years ago

I think the issue is still active, but it is more an improvment. By the way, I corrected a few bugs in VCM PR about smart pointers. I suggest to add a discussion on that topic during next DGtal meeting

JacquesOlivierLachaud commented 10 years ago

See PR #894

dcoeurjo commented 10 years ago

fixed. closing