summaryrefslogtreecommitdiff
path: root/src/ipa/libipa/vector.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipa/libipa/vector.cpp')
-rw-r--r--src/ipa/libipa/vector.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/ipa/libipa/vector.cpp b/src/ipa/libipa/vector.cpp
index 5de4ae48..4e987d82 100644
--- a/src/ipa/libipa/vector.cpp
+++ b/src/ipa/libipa/vector.cpp
@@ -148,6 +148,23 @@ namespace ipa {
* \return True if the two vectors are not equal, false otherwise
*/
+#ifndef __DOXYGEN__
+bool vectorValidateYaml(const YamlObject &obj, unsigned int size)
+{
+ if (!obj.isList())
+ return false;
+
+ if (obj.size() != size) {
+ LOG(Vector, Error)
+ << "Wrong number of values in YAML vector: expected "
+ << size << ", got " << obj.size();
+ return false;
+ }
+
+ return true;
+}
+#endif /* __DOXYGEN__ */
+
} /* namespace ipa */
} /* namespace libcamera */