From 91dedb0eea1b9e76352967231a4408e8c39694df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atgeirr=20Fl=C3=B8=20Rasmussen?= Date: Tue, 15 Apr 2014 13:40:50 +0200 Subject: [PATCH] Avoid signed/unsigned warning. --- opm/core/simulator/initStateEquil.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/opm/core/simulator/initStateEquil.hpp b/opm/core/simulator/initStateEquil.hpp index c1f72b714..dc5215c26 100644 --- a/opm/core/simulator/initStateEquil.hpp +++ b/opm/core/simulator/initStateEquil.hpp @@ -525,7 +525,8 @@ namespace Opm for (size_t i = 0; i < rec.size(); ++i) { const int cell = *(eqlmap.cells(i).begin()); if (rec[i].live_oil_table_index > 0) { - if (newParserDeck->hasKeyword("RSVD") && rec[i].live_oil_table_index <= newParserDeck->getKeyword("RSVD")->size()) { + const int tab_size = newParserDeck->getKeyword("RSVD")->size(); + if (newParserDeck->hasKeyword("RSVD") && rec[i].live_oil_table_index <= tab_size) { Opm::SimpleTable rsvd(newParserDeck->getKeyword("RSVD"),std::vector{"vd", "rs"},rec[i].live_oil_table_index-1); std::vector vd(rsvd.getColumn("vd")); std::vector rs(rsvd.getColumn("rs")); @@ -555,7 +556,8 @@ namespace Opm for (size_t i = 0; i < rec.size(); ++i) { const int cell = *(eqlmap.cells(i).begin()); if (rec[i].wet_gas_table_index > 0) { - if (newParserDeck->hasKeyword("RVVD") && rec[i].wet_gas_table_index <= newParserDeck->getKeyword("RVVD")->size()) { + const int tab_size = newParserDeck->getKeyword("RVVD")->size(); + if (newParserDeck->hasKeyword("RVVD") && rec[i].wet_gas_table_index <= tab_size) { Opm::SimpleTable rvvd(newParserDeck->getKeyword("RVVD"),std::vector{"vd", "rv"},rec[i].wet_gas_table_index-1); std::vector vd(rvvd.getColumn("vd")); std::vector rv(rvvd.getColumn("rv"));