Skip to content

Commit 2476d31

Browse files
committed
refactor
1 parent 61877ad commit 2476d31

2 files changed

Lines changed: 6 additions & 8 deletions

File tree

export/tests/basic_test.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class Model : public fmu4cpp::fmu_base {
88

99
public:
10-
explicit Model(const fmu4cpp::fmu_data &data) : fmu_base(data) {
10+
FMU4CPP_CTOR(Model) {
1111

1212
register_variable(real("myReal", &real_)
1313
.setCausality(fmu4cpp::causality_t::OUTPUT));
@@ -37,15 +37,14 @@ class Model : public fmu4cpp::fmu_base {
3737
}
3838

3939
private:
40-
bool boolean_;
41-
int integer_;
42-
double real_;
40+
bool boolean_{};
41+
int integer_{};
42+
double real_{};
4343
std::string str_;
4444
};
4545

4646
fmu4cpp::model_info fmu4cpp::get_model_info() {
47-
model_info m;
48-
return m;
47+
return {};
4948
}
5049

5150
std::string fmu4cpp::model_identifier() {

export/tests/test_resource.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@
77
class Model : public fmu4cpp::fmu_base {
88

99
public:
10-
explicit Model(const fmu4cpp::fmu_data &data) : fmu_base(data) {
10+
FMU4CPP_CTOR(Model) {
1111

1212
std::ifstream file(resourceLocation().string() + "/data.txt");
13-
1413
std::getline(file, data_);
1514

1615
register_variable(string("data", &data_)

0 commit comments

Comments
 (0)