summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-10-03 22:55:11 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-10-07 18:10:16 +0300
commit7e38ae8a1ef6e82285c818d92905f539686f80ce (patch)
tree92c23bd1a7361f289460af9d7dde572c61de210e /include
parent014698cba1f4e6a0325fe070c9208c74d7639b74 (diff)
libcamera: pipeline_handler: Make factory create() function const
The PipelineHandlerFactory::create() function has no need to modify the factory instance. Make it const, as well as the createInstance() function. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Xavier Roumegue <xavier.roumegue@oss.nxp.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/internal/pipeline_handler.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h
index 20f1cbb0..46df69dc 100644
--- a/include/libcamera/internal/pipeline_handler.h
+++ b/include/libcamera/internal/pipeline_handler.h
@@ -104,7 +104,7 @@ public:
PipelineHandlerFactory(const char *name);
virtual ~PipelineHandlerFactory() = default;
- std::shared_ptr<PipelineHandler> create(CameraManager *manager);
+ std::shared_ptr<PipelineHandler> create(CameraManager *manager) const;
const std::string &name() const { return name_; }
@@ -112,7 +112,7 @@ public:
static std::vector<PipelineHandlerFactory *> &factories();
private:
- virtual PipelineHandler *createInstance(CameraManager *manager) = 0;
+ virtual PipelineHandler *createInstance(CameraManager *manager) const = 0;
std::string name_;
};
@@ -124,7 +124,7 @@ public: \
handler##Factory() : PipelineHandlerFactory(#handler) {} \
\
private: \
- PipelineHandler *createInstance(CameraManager *manager) \
+ PipelineHandler *createInstance(CameraManager *manager) const \
{ \
return new handler(manager); \
} \