[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi] questionable code checking for e_currbasis in ihs_acctval.cpp
From: |
Vadim Zeitlin |
Subject: |
[lmi] questionable code checking for e_currbasis in ihs_acctval.cpp |
Date: |
Mon, 24 Mar 2008 05:31:46 +0100 |
Hello again,
There are 4 occurrences of the following expression in ihs_acctval.cpp:
!e_currbasis == ExpAndGABasis
which attracted my attention because MSVC complained about
'==' : unsafe mix of type 'bool' and type 'int' in operation
for each of them.
The error message is not very precise but I think that there could be a
real problem here because the above compares ExpAndGABasis with the result
of negating e_currbasis (which happens to be 0), i.e. 1 (which happens to
be e_guarbasis. I'm not at all sure that this was the intention and if it
was I still think that the code should be changed to read
e_guarbasis == ExpAndGABasis
But maybe the real intention was
e_currbasis != ExpAndGABasis
?
Thanks,
VZ
- [lmi] questionable code checking for e_currbasis in ihs_acctval.cpp,
Vadim Zeitlin <=