Skip to content

[apps] Deal with aliases in PointCloud Editor app #4013

@aPonza

Description

@aPonza

After #3753, the PointCloud Editor app has mixed references to pcl::shared_ptr and std::shared_ptr due to the existence of the file localTypes.h. I believe the best course of action would be to remove:

/// The type for std shared pointer pointing to a cloud object
using CloudPtr = std::shared_ptr<Cloud>;
/// The type for std shared pointer pointing to a constant cloud
/// object
using ConstCloudPtr = std::shared_ptr<const Cloud>;
/// The type for std shared pointer pointing to a selection buffer
using SelectionPtr = std::shared_ptr<Selection>;
/// The type for std shared pointer pointing to a constant selection
/// buffer
using ConstSelectionPtr = std::shared_ptr<const Selection>;
/// The type for std shared pointer pointing to a copy buffer
using CopyBufferPtr = std::shared_ptr<CopyBuffer>;
/// The type for std shared pointer pointing to a constant copy
/// buffer
using ConstCopyBufferPtr = std::shared_ptr<const CopyBuffer>;
/// The type for std shared pointer pointing to a command object
using CommandPtr = std::shared_ptr<Command>;

and

/// The type for std shared pointer pointing to a command queue
/// object
using CommandQueuePtr = std::shared_ptr<CommandQueue>;

from the file and deal with the ruckus of every other file using that one in the app. This means using the same strategy of the referenced PR and introducing in-class aliases like e.g.:

class Cloud : public Statistics
{
  public:
    /// The type for shared pointer pointing to a selection buffer
    using SelectionPtr = pcl::shared_ptr<Selection>;

    [...]
};

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions