Message ID | 20190115151849.1547-5-laurent.pinchart@ideasonboard.com |
---|---|
State | Accepted |
Headers | show |
Series |
|
Related | show |
Hi Laurent, Thanks for your work. On 2019-01-15 17:18:45 +0200, Laurent Pinchart wrote: > The PipelineHandlerFactory::handlers() static method returns a list of > factories, not a list of handlers. Rename it accordingly. > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Nice call, Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> > --- > src/libcamera/camera_manager.cpp | 4 ++-- > src/libcamera/include/pipeline_handler.h | 2 +- > src/libcamera/pipeline_handler.cpp | 6 +++--- > 3 files changed, 6 insertions(+), 6 deletions(-) > > diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp > index 4313994e97c8..a17bf3d13a04 100644 > --- a/src/libcamera/camera_manager.cpp > +++ b/src/libcamera/camera_manager.cpp > @@ -86,9 +86,9 @@ int CameraManager::start() > * file and only fallback on all handlers if there is no > * configuration file. > */ > - std::vector<PipelineHandlerFactory *> &handlers = PipelineHandlerFactory::handlers(); > + std::vector<PipelineHandlerFactory *> &factories = PipelineHandlerFactory::factories(); > > - for (PipelineHandlerFactory *factory : handlers) { > + for (PipelineHandlerFactory *factory : factories) { > /* > * Try each pipeline handler until it exhaust > * all pipelines it can provide. > diff --git a/src/libcamera/include/pipeline_handler.h b/src/libcamera/include/pipeline_handler.h > index 764dde9ccc65..e976aaa13546 100644 > --- a/src/libcamera/include/pipeline_handler.h > +++ b/src/libcamera/include/pipeline_handler.h > @@ -39,7 +39,7 @@ public: > const std::string &name() const { return name_; } > > static void registerType(PipelineHandlerFactory *factory); > - static std::vector<PipelineHandlerFactory *> &handlers(); > + static std::vector<PipelineHandlerFactory *> &factories(); > > private: > std::string name_; > diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp > index 08e3291e741a..4dfbc814a813 100644 > --- a/src/libcamera/pipeline_handler.cpp > +++ b/src/libcamera/pipeline_handler.cpp > @@ -92,7 +92,7 @@ namespace libcamera { > * \param[in] name Name of the pipeline handler class > * > * Creating an instance of the factory registers is with the global list of > - * factories, accessible through the handlers() function. > + * factories, accessible through the factories() function. > * > * The factory \a name is used for debug purpose and shall be unique. > */ > @@ -127,7 +127,7 @@ PipelineHandlerFactory::PipelineHandlerFactory(const char *name) > */ > void PipelineHandlerFactory::registerType(PipelineHandlerFactory *factory) > { > - std::vector<PipelineHandlerFactory *> &factories = handlers(); > + std::vector<PipelineHandlerFactory *> &factories = PipelineHandlerFactory::factories(); > > for (PipelineHandlerFactory *f : factories) > ASSERT(factory->name() != f->name()); > @@ -145,7 +145,7 @@ void PipelineHandlerFactory::registerType(PipelineHandlerFactory *factory) > * > * \return the list of pipeline handler factories > */ > -std::vector<PipelineHandlerFactory *> &PipelineHandlerFactory::handlers() > +std::vector<PipelineHandlerFactory *> &PipelineHandlerFactory::factories() > { > static std::vector<PipelineHandlerFactory *> factories; > return factories; > -- > Regards, > > Laurent Pinchart > > _______________________________________________ > libcamera-devel mailing list > libcamera-devel@lists.libcamera.org > https://lists.libcamera.org/listinfo/libcamera-devel
diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp index 4313994e97c8..a17bf3d13a04 100644 --- a/src/libcamera/camera_manager.cpp +++ b/src/libcamera/camera_manager.cpp @@ -86,9 +86,9 @@ int CameraManager::start() * file and only fallback on all handlers if there is no * configuration file. */ - std::vector<PipelineHandlerFactory *> &handlers = PipelineHandlerFactory::handlers(); + std::vector<PipelineHandlerFactory *> &factories = PipelineHandlerFactory::factories(); - for (PipelineHandlerFactory *factory : handlers) { + for (PipelineHandlerFactory *factory : factories) { /* * Try each pipeline handler until it exhaust * all pipelines it can provide. diff --git a/src/libcamera/include/pipeline_handler.h b/src/libcamera/include/pipeline_handler.h index 764dde9ccc65..e976aaa13546 100644 --- a/src/libcamera/include/pipeline_handler.h +++ b/src/libcamera/include/pipeline_handler.h @@ -39,7 +39,7 @@ public: const std::string &name() const { return name_; } static void registerType(PipelineHandlerFactory *factory); - static std::vector<PipelineHandlerFactory *> &handlers(); + static std::vector<PipelineHandlerFactory *> &factories(); private: std::string name_; diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp index 08e3291e741a..4dfbc814a813 100644 --- a/src/libcamera/pipeline_handler.cpp +++ b/src/libcamera/pipeline_handler.cpp @@ -92,7 +92,7 @@ namespace libcamera { * \param[in] name Name of the pipeline handler class * * Creating an instance of the factory registers is with the global list of - * factories, accessible through the handlers() function. + * factories, accessible through the factories() function. * * The factory \a name is used for debug purpose and shall be unique. */ @@ -127,7 +127,7 @@ PipelineHandlerFactory::PipelineHandlerFactory(const char *name) */ void PipelineHandlerFactory::registerType(PipelineHandlerFactory *factory) { - std::vector<PipelineHandlerFactory *> &factories = handlers(); + std::vector<PipelineHandlerFactory *> &factories = PipelineHandlerFactory::factories(); for (PipelineHandlerFactory *f : factories) ASSERT(factory->name() != f->name()); @@ -145,7 +145,7 @@ void PipelineHandlerFactory::registerType(PipelineHandlerFactory *factory) * * \return the list of pipeline handler factories */ -std::vector<PipelineHandlerFactory *> &PipelineHandlerFactory::handlers() +std::vector<PipelineHandlerFactory *> &PipelineHandlerFactory::factories() { static std::vector<PipelineHandlerFactory *> factories; return factories;
The PipelineHandlerFactory::handlers() static method returns a list of factories, not a list of handlers. Rename it accordingly. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> --- src/libcamera/camera_manager.cpp | 4 ++-- src/libcamera/include/pipeline_handler.h | 2 +- src/libcamera/pipeline_handler.cpp | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-)