diff --git a/src/graphRegex/GraphFsmInterpreter.cpp b/src/graphRegex/GraphFsmInterpreter.cpp
index de27182643f5f9dce7a019db48285d32fd49eee9..03e86487513065af47d91fc5265335bba456e64e 100644
--- a/src/graphRegex/GraphFsmInterpreter.cpp
+++ b/src/graphRegex/GraphFsmInterpreter.cpp
@@ -6,7 +6,7 @@ using namespace Aidge;
 GraphFsmInterpreter::GraphFsmInterpreter(const std::string graphMatchExpr,std::vector<std::shared_ptr<ConditionalInterpreter>>&nodesCondition):mParser(graphMatchExpr){
     mActGroupe = 0;
 
-    for (const auto obj : nodesCondition) {
+    for (const auto &obj : nodesCondition) {
         if(mNodesCondition.find(obj->getKey()) ==mNodesCondition.end()){
              mNodesCondition[obj->getKey()] = obj;
         }else{
diff --git a/src/graphRegex/GraphRegex.cpp b/src/graphRegex/GraphRegex.cpp
index d8e45595d92fe3235f58c490791dde420627e9a1..ef0db8c88f3e753f9b9633b1ffb05bbec6d00424 100644
--- a/src/graphRegex/GraphRegex.cpp
+++ b/src/graphRegex/GraphRegex.cpp
@@ -7,7 +7,7 @@ void GraphRegex::setKeyFromGraph(std::shared_ptr<GraphView> ref){
     for (const NodePtr& node : ref->getNodes()) {
         std::string type =  node->type();
         bool isIn = false;
-        for(const auto test:mAllTest){
+        for(const auto &test:mAllTest){
             if(test->getKey() == type){
                 isIn = true;
                 break;