Skip to content

workaround for compiler warning against different signedness variables

Thank you very much for your continuous effort in GSOC 2022! I want to propose a few workarounds to calm the compiler warning for signedness.

The object newPalettes is std::vector object, so its size() method returns size_t-typed integer. Thus, popular looping like "for (int i = 0; ...)" would be complained. Using "for (size_t i = 0; ...)" would be the easiest workarounds.

Unfortunately, QComboBox's count() method returns normal (signed) int, so it cannot be compared with std::vecotr size() result. I'm sorry for proposing an ugly workaround by inserting a cast to size_t. I don't think QComboBox count() would not return a negative value. My understanding is correct?

Merge request reports

Loading