vietjtnguyen / argagg

A simple C++11 command line argument parser
MIT License
224 stars 28 forks source link

replace static_cast<bool> w/ non-zero comparison to avoid compiler… #12

Closed jadamcrain closed 7 years ago

jadamcrain commented 7 years ago

… warnings on MSVC.

using static_cast<bool>(int) on MSVC results in a compiler warning.  Proposing this as a portable substitute.

Discussion from SO:

https://stackoverflow.com/questions/4968033/why-does-casting-an-int-to-a-bool-give-a-warning