Hotfix for cppcheck errors
Use std:: functions for better performance