Remove unused variable
Replace pointer with const reference
Replace pointer with const reference
Replace pointer with const reference
Code style
Code style
Code style
Indentation
Code style
Change type of variable to bool
Cleanup boolean condition