base: Use a const auto & in a range based for loop.

clang 11 complains otherwise which breaks the build, and this way
is less verbose and more efficient since it doesn't require copying
a vector of strings for each element of the loop.

Change-Id: I005fa5fdf19ddba2114e98413e3609b0a91c1ec5
Reviewed-by: Giacomo Travaglini <>
Reviewed-by: Jason Lowe-Power <>
Maintainer: Giacomo Travaglini <>
Tested-by: kokoro <>
diff --git a/src/base/ b/src/base/
index 7c2c0cf..bfbdbf0 100644
--- a/src/base/
+++ b/src/base/
@@ -109,7 +109,7 @@
     std::vector<std::vector<std::string> > to_return;
-    for (const std::vector<std::string> expression : tokens) {
+    for (const auto &expression: tokens) {
         std::vector<std::string> to_add;
         to_add.insert(to_add.end(), expression.begin(), expression.end());