| Message ID | 20260113000808.15395-24-laurent.pinchart@ideasonboard.com |
|---|---|
| State | New |
| Headers | show |
| Series |
|
| Related | show |
2026. 01. 13. 1:07 keltezéssel, Laurent Pinchart írta: > Once parsed, the global configuration isn't a YAML file anymore. Rename > the yamlConfiguration_ to configuration_. > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> > include/libcamera/internal/global_configuration.h | 2 +- > src/libcamera/global_configuration.cpp | 6 +++--- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/include/libcamera/internal/global_configuration.h b/include/libcamera/internal/global_configuration.h > index 80b57b38ba03..5c907ee92bfe 100644 > --- a/include/libcamera/internal/global_configuration.h > +++ b/include/libcamera/internal/global_configuration.h > @@ -56,7 +56,7 @@ private: > void load(); > bool loadFile(const std::filesystem::path &fileName); > > - std::unique_ptr<ValueNode> yamlConfiguration_ = > + std::unique_ptr<ValueNode> configuration_ = > std::make_unique<ValueNode>(); > }; > > diff --git a/src/libcamera/global_configuration.cpp b/src/libcamera/global_configuration.cpp > index 44ed206de78f..ee7d9c185b80 100644 > --- a/src/libcamera/global_configuration.cpp > +++ b/src/libcamera/global_configuration.cpp > @@ -125,7 +125,7 @@ bool GlobalConfiguration::loadFile(const std::filesystem::path &fileName) > return true; > } > > - yamlConfiguration_ = std::move(configuration); > + configuration_ = std::move(configuration); > return true; > } > > @@ -141,7 +141,7 @@ bool GlobalConfiguration::loadFile(const std::filesystem::path &fileName) > */ > unsigned int GlobalConfiguration::version() const > { > - return (*yamlConfiguration_)["version"].get<unsigned int>().value_or(0); > + return (*configuration_)["version"].get<unsigned int>().value_or(0); > } > > /** > @@ -160,7 +160,7 @@ unsigned int GlobalConfiguration::version() const > */ > GlobalConfiguration::Configuration GlobalConfiguration::configuration() const > { > - return (*yamlConfiguration_)["configuration"]; > + return (*configuration_)["configuration"]; > } > > /**
diff --git a/include/libcamera/internal/global_configuration.h b/include/libcamera/internal/global_configuration.h index 80b57b38ba03..5c907ee92bfe 100644 --- a/include/libcamera/internal/global_configuration.h +++ b/include/libcamera/internal/global_configuration.h @@ -56,7 +56,7 @@ private: void load(); bool loadFile(const std::filesystem::path &fileName); - std::unique_ptr<ValueNode> yamlConfiguration_ = + std::unique_ptr<ValueNode> configuration_ = std::make_unique<ValueNode>(); }; diff --git a/src/libcamera/global_configuration.cpp b/src/libcamera/global_configuration.cpp index 44ed206de78f..ee7d9c185b80 100644 --- a/src/libcamera/global_configuration.cpp +++ b/src/libcamera/global_configuration.cpp @@ -125,7 +125,7 @@ bool GlobalConfiguration::loadFile(const std::filesystem::path &fileName) return true; } - yamlConfiguration_ = std::move(configuration); + configuration_ = std::move(configuration); return true; } @@ -141,7 +141,7 @@ bool GlobalConfiguration::loadFile(const std::filesystem::path &fileName) */ unsigned int GlobalConfiguration::version() const { - return (*yamlConfiguration_)["version"].get<unsigned int>().value_or(0); + return (*configuration_)["version"].get<unsigned int>().value_or(0); } /** @@ -160,7 +160,7 @@ unsigned int GlobalConfiguration::version() const */ GlobalConfiguration::Configuration GlobalConfiguration::configuration() const { - return (*yamlConfiguration_)["configuration"]; + return (*configuration_)["configuration"]; } /**
Once parsed, the global configuration isn't a YAML file anymore. Rename the yamlConfiguration_ to configuration_. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> --- include/libcamera/internal/global_configuration.h | 2 +- src/libcamera/global_configuration.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)