Merge pull request #3390 from akva2/janitoring

fixed: do not assert conditions guaranteed by unsigned
This commit is contained in:
Bård Skaflestad 2021-06-18 16:52:47 +02:00 committed by GitHub
commit 7a9c9bedea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 5 deletions

View File

@ -181,7 +181,7 @@ protected:
*/
unsigned upstreamIndex_(unsigned phaseIdx) const
{
assert(0 <= phaseIdx && phaseIdx < numPhases);
assert(phaseIdx < numPhases);
return upIdx_[phaseIdx];
}
@ -195,7 +195,7 @@ protected:
*/
unsigned downstreamIndex_(unsigned phaseIdx) const
{
assert(0 <= phaseIdx && phaseIdx < numPhases);
assert(phaseIdx < numPhases);
return dnIdx_[phaseIdx];
}

View File

@ -17,8 +17,9 @@
along with OPM. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <opm/simulators/utils/DeferredLogger.hpp>
#include <opm/common/OpmLog/OpmLog.hpp>
namespace Opm
{

View File

@ -21,8 +21,6 @@
#ifndef OPM_DEFERREDLOGGER_HEADER_INCLUDED
#define OPM_DEFERREDLOGGER_HEADER_INCLUDED
#include <opm/common/OpmLog/OpmLog.hpp>
#include <string>
#include <vector>