Qucs / qucsator

Circuit simulator of the Qucs project
http://qucs.sourceforge.net
GNU General Public License v2.0
23 stars 10 forks source link

Fix warnings about integer comparison #11

Open guitorri opened 6 years ago

guitorri commented 6 years ago

If the -Wsign-compare flag is turned on a bunch of such warnings start to pup up.

 warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

There is also a mix of int, unsigned int and std::size_t. It is better to choose one and make it uniform.

It is not very hard to fix, but if one starts fixing the member variables, getters and setters on the base classes/templates, you quickly go from a dozen of warnings to thousands...

See also Qucs/qucs#363

felix-salfelder commented 6 years ago

It is better to choose one and make it uniform.

not entirely sure about that. there are different types of numbers with different uses.

i would suggest to

these should mix up in rare cases only. the nasty cases involve virtual function overloads, be sure to enable that "hidden virtual" warning...