summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/internal/pipeline_handler.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h
index ebbdf2aa..ad74dc82 100644
--- a/include/libcamera/internal/pipeline_handler.h
+++ b/include/libcamera/internal/pipeline_handler.h
@@ -113,7 +113,8 @@ public:
private:
static void registerType(PipelineHandlerFactory *factory);
- virtual PipelineHandler *createInstance(CameraManager *manager) const = 0;
+ virtual std::unique_ptr<PipelineHandler>
+ createInstance(CameraManager *manager) const = 0;
std::string name_;
};
@@ -125,9 +126,10 @@ public: \
handler##Factory() : PipelineHandlerFactory(#handler) {} \
\
private: \
- PipelineHandler *createInstance(CameraManager *manager) const \
+ std::unique_ptr<PipelineHandler> \
+ createInstance(CameraManager *manager) const \
{ \
- return new handler(manager); \
+ return std::make_unique<handler>(manager); \
} \
}; \
static handler##Factory global_##handler##Factory;