* wrap min and max in parenthesis for Visual studio 2017 and earlier compatibility * try pre-commit to detect min/max issues * actually fix the identified issues from the new check * more min/max fixes