Part: Geometry extensions set interface
======================================= unique_ptr is a move only type. Therefore it may only take an rvalue. It does not make sense a pass by value for move only types (Item 41).
This commit is contained in:
@@ -288,7 +288,7 @@ const std::weak_ptr<GeometryExtension> Geometry::getExtension(Base::Type type) c
|
||||
throw Base::ValueError("No geometry extension of the requested type.");
|
||||
}
|
||||
|
||||
void Geometry::setExtension(std::unique_ptr<GeometryExtension> geo)
|
||||
void Geometry::setExtension(std::unique_ptr<GeometryExtension> && geo)
|
||||
{
|
||||
bool hasext=false;
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ public:
|
||||
|
||||
bool hasExtension(Base::Type type) const;
|
||||
const std::weak_ptr<GeometryExtension> getExtension(Base::Type type) const;
|
||||
void setExtension(std::unique_ptr<GeometryExtension> geo);
|
||||
void setExtension(std::unique_ptr<GeometryExtension> &&geo);
|
||||
|
||||
protected:
|
||||
/// create a new tag for the geometry object
|
||||
|
||||
Reference in New Issue
Block a user