Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0030226Open CASCADE[OCCT] PRODUCTS:Point Cloud Renderingpublic2018-10-09 19:452018-10-16 11:01
Assigned Togka 
PrioritynormalSeverityintegration request 
PlatformOSOS Version
Product Version[OCCT] 7.2.0 
Target Version[OCCT] 7.4.0*Fixed in Version 
Summary0030226: Point Cloud Rendering - Method PointCloud_PointCloud::GetSelected() returns pointer on a local variable
DescriptionMethod PointCloud_PointCloud::GetSelected() returns pointer on the local variable for class PointCloud_PointStorage
TagsNo tags attached.
Test case number
Attached Files

- Relationships

-  Notes
kgv (developer)
2018-10-10 15:50

   //! Returns storage containing all selected points.
   //! Returns NULL if there is no data at all.
   //! Does not own (will not delete) returned PC_PointStorage object.
-  Standard_EXPORT PointCloud_PointStorage* GetSelected (const bool theGetClosestOnly = false);
+  Standard_EXPORT Handle(PointCloud_PointStorage) PointCloud_PointCloud::GetSelected(const bool theGetClosestOnly 
= false);

The method description and Point Cloud logic suggest that returned pointer
should be wrapped by std::unique_ptr<> or similar.

So that there is NO bug in PointCloud_PointCloud::GetSelected() method - it just follows inconvenient conception.

If Handle() is proposed to be used instead std::unique_ptr,
then documentation across PointCloud module should be updated
(PointCloud_PointCloud::GetSelected( method first of all).

- Issue History
Date Modified Username Field Change
2018-10-09 19:45 gka New Issue
2018-10-09 19:45 gka Assigned To => gka
2018-10-10 15:44 kgv Summary Method PointCloud_PointCloud::GetSelected returns pointer on the local variable. => Point Cloud Rendering - Method PointCloud_PointCloud::GetSelected() returns pointer on a local variable
2018-10-10 15:50 kgv Note Added: 0079854
2018-10-10 15:50 kgv Severity minor => integration request
2018-10-10 15:51 kgv Relationship added child of 0028023
2018-10-10 15:51 kgv Product Version 7.3.0 => 7.2.0

Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker