From 5b64baa29e57668e181d9483e79ffa8569be5435 Mon Sep 17 00:00:00 2001 From: Phil Miller Date: Mon, 10 Jun 2024 17:07:27 -0700 Subject: [PATCH] Update BMI C++ header to match upstream with virtual dtor and correct namespace --- bmi/bmi.hxx | 8 +++++--- include/bmi_lgar.hxx | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/bmi/bmi.hxx b/bmi/bmi.hxx index 87b290b..b25fd8c 100644 --- a/bmi/bmi.hxx +++ b/bmi/bmi.hxx @@ -9,10 +9,10 @@ #include #include -namespace bmixx { +namespace bmi { - //const int BMI_SUCCESS = 0; - // const int BMI_FAILURE = 1; + const int BMI_SUCCESS = 0; + const int BMI_FAILURE = 1; const int MAX_COMPONENT_NAME = 2048; const int MAX_VAR_NAME = 2048; @@ -21,6 +21,8 @@ namespace bmixx { class Bmi { public: + virtual ~Bmi() { } + // Model control functions. virtual void Initialize(std::string config_file) = 0; virtual void Update() = 0; diff --git a/include/bmi_lgar.hxx b/include/bmi_lgar.hxx index a39fb7f..606f59d 100644 --- a/include/bmi_lgar.hxx +++ b/include/bmi_lgar.hxx @@ -27,7 +27,7 @@ class NotImplemented : public std::logic_error { } -class BmiLGAR : public bmixx::Bmi { +class BmiLGAR : public bmi::Bmi { public: BmiLGAR() { this->input_var_names[0] = "precipitation_rate";