mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-04 04:19:36 +00:00
mute an MSVC warning about an assignment in a conditional expression
(gcc does it too but not if there are extra () used; there are only few cases so we better mute them)
This commit is contained in:
parent
854ccbf210
commit
c6792bd603
@ -205,6 +205,10 @@ namespace {
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning (push)
|
||||
#pragma warning (disable: 4706)
|
||||
#endif
|
||||
bool version_numbers_comparison_internal(const version_info& l, const version_info& r, COMP_TYPE o)
|
||||
{
|
||||
if((!l.good()) || !r.good()) throw version_info::not_sane_exception();
|
||||
@ -233,6 +237,9 @@ namespace {
|
||||
unsigned int const& rvalue = rc[i];
|
||||
if(o == NOT_EQUAL) {
|
||||
if((result = (lvalue != rvalue))) {
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning (pop)
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
continue;
|
||||
|
Loading…
x
Reference in New Issue
Block a user