[fix] use referece instead of copy in loop

5 jobs for !3130 with fix/use-reference-in-function
latest merge request