Use std::find instead of manual loop.