Fixed some warnings

This commit is contained in:
Kjetil Olsen Lye 2012-04-10 15:01:52 +02:00
parent 65d3ad547e
commit 36ffb7416a
3 changed files with 10 additions and 10 deletions

View File

@ -41,11 +41,11 @@ namespace Opm
} }
std::tr1::shared_ptr<WellsGroupInterface> child; std::tr1::shared_ptr<WellsGroupInterface> child;
for (int i = 0; i < roots_.size(); ++i) { for (size_t i = 0; i < roots_.size(); ++i) {
if (roots_[i]->name() == child_name) { if (roots_[i]->name() == child_name) {
child = roots_[i]; child = roots_[i];
// We've found a new parent to the previously thought root, need to remove it // We've found a new parent to the previously thought root, need to remove it
for(int j = i; j < roots_.size() - 1; ++j) { for(size_t j = i; j < roots_.size() - 1; ++j) {
roots_[j] = roots_[j+1]; roots_[j] = roots_[j+1];
} }
@ -75,7 +75,7 @@ namespace Opm
WellsGroupInterface* WellCollection::findNode(std::string name) WellsGroupInterface* WellCollection::findNode(std::string name)
{ {
for (int i = 0; i < roots_.size(); i++) { for (size_t i = 0; i < roots_.size(); i++) {
WellsGroupInterface* result = roots_[i]->findGroup(name); WellsGroupInterface* result = roots_[i]->findGroup(name);
if (result) { if (result) {
return result; return result;

View File

@ -41,7 +41,7 @@ namespace Opm
if (name() == name_of_node) { if (name() == name_of_node) {
return this; return this;
} else { } else {
for (int i = 0; i < children_.size(); i++) { for (size_t i = 0; i < children_.size(); i++) {
WellsGroupInterface* result = children_[i]->findGroup(name_of_node); WellsGroupInterface* result = children_[i]->findGroup(name_of_node);
if (result) { if (result) {
return result; return result;
@ -179,7 +179,7 @@ namespace Opm
bool isWell = false; bool isWell = false;
if (deck.hasField("WELSPECS")) { if (deck.hasField("WELSPECS")) {
WELSPECS wspecs = deck.getWELSPECS(); WELSPECS wspecs = deck.getWELSPECS();
for (int i = 0; i < wspecs.welspecs.size(); i++) { for (size_t i = 0; i < wspecs.welspecs.size(); i++) {
if (wspecs.welspecs[i].name_ == name) { if (wspecs.welspecs[i].name_ == name) {
isWell = true; isWell = true;
break; break;
@ -193,7 +193,7 @@ namespace Opm
InjectionSpecification injection_specification; InjectionSpecification injection_specification;
if (deck.hasField("WCONINJE")) { if (deck.hasField("WCONINJE")) {
WCONINJE wconinje = deck.getWCONINJE(); WCONINJE wconinje = deck.getWCONINJE();
for (int i = 0; i < wconinje.wconinje.size(); i++) { for (size_t i = 0; i < wconinje.wconinje.size(); i++) {
if (wconinje.wconinje[i].well_ == name) { if (wconinje.wconinje[i].well_ == name) {
WconinjeLine line = wconinje.wconinje[i]; WconinjeLine line = wconinje.wconinje[i];
injection_specification.BHP_limit_ = line.BHP_limit_; injection_specification.BHP_limit_ = line.BHP_limit_;
@ -207,7 +207,7 @@ namespace Opm
ProductionSpecification production_specification; ProductionSpecification production_specification;
if (deck.hasField("WCONPROD")) { if (deck.hasField("WCONPROD")) {
WCONPROD wconprod = deck.getWCONPROD(); WCONPROD wconprod = deck.getWCONPROD();
for (int i = 0; i < wconprod.wconprod.size(); i++) { for (size_t i = 0; i < wconprod.wconprod.size(); i++) {
if (wconprod.wconprod[i].well_ == name) { if (wconprod.wconprod[i].well_ == name) {
WconprodLine line = wconprod.wconprod[i]; WconprodLine line = wconprod.wconprod[i];
production_specification.BHP_limit_ = line.BHP_limit_; production_specification.BHP_limit_ = line.BHP_limit_;
@ -224,7 +224,7 @@ namespace Opm
InjectionSpecification injection_specification; InjectionSpecification injection_specification;
if (deck.hasField("GCONINJE")) { if (deck.hasField("GCONINJE")) {
GCONINJE gconinje = deck.getGCONINJE(); GCONINJE gconinje = deck.getGCONINJE();
for (int i = 0; i < gconinje.gconinje.size(); i++) { for (size_t i = 0; i < gconinje.gconinje.size(); i++) {
if (gconinje.gconinje[i].group_ == name) { if (gconinje.gconinje[i].group_ == name) {
GconinjeLine line = gconinje.gconinje[i]; GconinjeLine line = gconinje.gconinje[i];
injection_specification.injector_type_ = toSurfaceComponent(line.injector_type_); injection_specification.injector_type_ = toSurfaceComponent(line.injector_type_);
@ -237,7 +237,7 @@ namespace Opm
ProductionSpecification production_specification; ProductionSpecification production_specification;
if (deck.hasField("GCONPROD")) { if (deck.hasField("GCONPROD")) {
GCONPROD gconprod = deck.getGCONPROD(); GCONPROD gconprod = deck.getGCONPROD();
for (int i = 0; i < gconprod.gconprod.size(); i++) { for (size_t i = 0; i < gconprod.gconprod.size(); i++) {
if (gconprod.gconprod[i].group_ == name) { if (gconprod.gconprod[i].group_ == name) {
GconprodLine line = gconprod.gconprod[i]; GconprodLine line = gconprod.gconprod[i];
production_specification.oil_max_rate_ = line.oil_max_rate_; production_specification.oil_max_rate_ = line.oil_max_rate_;

View File

@ -518,7 +518,7 @@ namespace Opm
if(deck.hasField("WELSPECS")) { if(deck.hasField("WELSPECS")) {
WELSPECS welspecs = deck.getWELSPECS(); WELSPECS welspecs = deck.getWELSPECS();
for(int i = 0; i < welspecs.welspecs.size(); ++i) { for(size_t i = 0; i < welspecs.welspecs.size(); ++i) {
WelspecsLine line = welspecs.welspecs[i]; WelspecsLine line = welspecs.welspecs[i];
wells_.addChild(line.name_, line.group_, deck); wells_.addChild(line.name_, line.group_, deck);
} }