Use a fancy stl function as recommended by cppcheck

It's just for fun, seemed like a neat trick the compiler recommended.
1 job for master in 36 seconds (queued for 7 seconds)