[v3,03/37] libcamera: yaml_parser: Rename Container to ValueContainer
diff mbox series

Message ID 20260423230059.3180987-4-laurent.pinchart@ideasonboard.com
State Accepted
Headers show
Series
  • libcamera: Global configuration file improvements
Related show

Commit Message

Laurent Pinchart April 23, 2026, 11 p.m. UTC
The YamlObject class defines two private types, Container and
ListContainer. The format is an alias to std::vector<Value>, and is used
to store child elements. The latter hasn't been used since commit
38987e165c28 ("libcamera: yaml_parser: Preserve order of items in
dictionary").

To prepare for upcoming reworks that will use the name 'Container' as a
template parameter, rename Container to ValueContainer for clarity, and
drop the unused ListContainer type.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>
---
 include/libcamera/internal/yaml_parser.h | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

Patch
diff mbox series

diff --git a/include/libcamera/internal/yaml_parser.h b/include/libcamera/internal/yaml_parser.h
index 8c7916565946..03d6a05e2d0f 100644
--- a/include/libcamera/internal/yaml_parser.h
+++ b/include/libcamera/internal/yaml_parser.h
@@ -36,8 +36,7 @@  private:
 		std::unique_ptr<YamlObject> value;
 	};
 
-	using Container = std::vector<Value>;
-	using ListContainer = std::vector<std::unique_ptr<YamlObject>>;
+	using ValueContainer = std::vector<Value>;
 
 public:
 #ifndef __DOXYGEN__
@@ -48,7 +47,7 @@  public:
 		using difference_type = std::ptrdiff_t;
 		using iterator_category = std::forward_iterator_tag;
 
-		Iterator(typename Container::const_iterator it)
+		Iterator(typename ValueContainer::const_iterator it)
 			: it_(it)
 		{
 		}
@@ -77,14 +76,14 @@  public:
 		}
 
 	protected:
-		Container::const_iterator it_;
+		ValueContainer::const_iterator it_;
 	};
 
 	template<typename Iterator>
 	class Adapter
 	{
 	public:
-		Adapter(const Container &container)
+		Adapter(const ValueContainer &container)
 			: container_(container)
 		{
 		}
@@ -100,7 +99,7 @@  public:
 		}
 
 	protected:
-		const Container &container_;
+		const ValueContainer &container_;
 	};
 
 	class ListIterator : public Iterator<ListIterator>
@@ -232,7 +231,7 @@  private:
 	Type type_;
 
 	std::string value_;
-	Container list_;
+	ValueContainer list_;
 	std::map<std::string, YamlObject *, std::less<>> dictionary_;
 };