Fix copying into for-loop variables

Clang 10 got a new warning for this.

Change-Id: Ibfc911c2153dae5fa20b862b3c204b97a474d462
diff --git a/src/ast_path.cpp b/src/ast_path.cpp
index e3e45d4..0aa839c 100644
--- a/src/ast_path.cpp
+++ b/src/ast_path.cpp
@@ -165,7 +165,7 @@
         res = "/";
     }
 
-    for (const auto it : path.m_nodes) {
+    for (const auto& it : path.m_nodes) {
         if (it.m_prefix)
             res = joinPaths(res, it.m_prefix.value().m_name + ":" + boost::apply_visitor(nodeToDataStringVisitor(), it.m_suffix));
         else
@@ -182,7 +182,7 @@
         res = "/";
     }
 
-    for (const auto it : path.m_nodes) {
+    for (const auto& it : path.m_nodes) {
         if (it.m_prefix)
             res = joinPaths(res, it.m_prefix.value().m_name + ":" + boost::apply_visitor(nodeToSchemaStringVisitor(), it.m_suffix));
         else