diff --git a/unittest/force-styles/test_config.h b/unittest/force-styles/test_config.h index ef4d911b60..18b4b4f0b2 100644 --- a/unittest/force-styles/test_config.h +++ b/unittest/force-styles/test_config.h @@ -15,8 +15,8 @@ #define TEST_CONFIG_H #include -#include #include +#include #include #include @@ -96,23 +96,21 @@ public: restart_vel.clear(); global_vector.clear(); } - virtual ~TestConfig(){}; + TestConfig(const TestConfig &) = delete; + TestConfig &operator=(const TestConfig &) = delete; std::string tags_line() const { - if(tags.size() > 0) { - std::stringstream line; - line << tags[0]; - for(size_t i = 1; i < tags.size(); i++) { - line << ", " << tags[i]; - } - return line.str(); - } - return "generated"; + if (tags.size() > 0) { + std::stringstream line; + line << tags[0]; + for (size_t i = 1; i < tags.size(); i++) { + line << ", " << tags[i]; + } + return line.str(); + } + return "generated"; } - -private: - TestConfig(const TestConfig &){}; }; #endif diff --git a/unittest/force-styles/test_config_reader.h b/unittest/force-styles/test_config_reader.h index 1f0de8df0a..23da817622 100644 --- a/unittest/force-styles/test_config_reader.h +++ b/unittest/force-styles/test_config_reader.h @@ -22,6 +22,8 @@ class TestConfigReader : public YamlReader { public: TestConfigReader(TestConfig &config); + TestConfigReader() = delete; + const TestConfigReader & operator=(TestConfig &) = delete; void skip_tests(const yaml_event_t &event); void prerequisites(const yaml_event_t &event); diff --git a/unittest/force-styles/yaml_writer.h b/unittest/force-styles/yaml_writer.h index 31df8eb60d..ca95a578c1 100644 --- a/unittest/force-styles/yaml_writer.h +++ b/unittest/force-styles/yaml_writer.h @@ -22,6 +22,9 @@ class YamlWriter { public: YamlWriter(const char *outfile); virtual ~YamlWriter(); + YamlWriter() = delete; + YamlWriter(const YamlWriter &) = delete; + const YamlWriter & operator=(const YamlWriter &) = delete; // emitters void emit(const std::string &key, const double value); @@ -34,10 +37,6 @@ private: FILE *fp; yaml_emitter_t emitter; yaml_event_t event; - -private: - YamlWriter(){}; - YamlWriter(const YamlWriter &){}; }; #endif