From 2feba1de797332e01a282d459ff39f72ba32ed06 Mon Sep 17 00:00:00 2001 From: Ahmad El Sayed Date: Thu, 2 Nov 2023 17:42:22 +0100 Subject: [PATCH] Fixed build error --- src/sfincs_bmi.cxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/sfincs_bmi.cxx b/src/sfincs_bmi.cxx index 67d7534..baca813 100644 --- a/src/sfincs_bmi.cxx +++ b/src/sfincs_bmi.cxx @@ -53,7 +53,7 @@ namespace { std::string &rtrim(std::string &str) { - str.erase(s.find_last_not_of(' ') + 1); + str.erase(str.find_last_not_of(' ') + 1); return str; } } @@ -70,8 +70,7 @@ void SfincsBmi::Initialize(std::string config_file) } void SfincsBmi::Update() { - int status = update(); - if (status != 0) + if (update() != 0) { throw BmiError(); } @@ -82,8 +81,7 @@ void SfincsBmi::UpdateUntil(double time) } void SfincsBmi::Finalize() { - int status = finalize(); - if (status != 0) + if (finalize() != 0) { throw BmiError(); }