diff --git a/Test/TestChecksumCompare.cc b/Test/TestChecksumCompare.cc index fae9147db9864399f81f71390758202281005978..808160ed8e3e12b9bf906e814bf9f35df1232703 100755 --- a/Test/TestChecksumCompare.cc +++ b/Test/TestChecksumCompare.cc @@ -356,10 +356,6 @@ void Compare::Impl::check_equal() const TEST_THROW_ERROR(TEST_CHECKSUM_COMPARE_DIFFERENCES); } } - -Compare::Impl* Compare::impl_ = nullptr; -bool Compare::owned_ = false; - void Compare::make() { if (impl_ != nullptr) @@ -371,7 +367,7 @@ void Compare::make() void Compare::set(Compare& _othr) { TEST_THROW_ERROR_if( - _othr.impl_ != nullptr, TEST_CHECKSUM_COMPARE_INCOMING_IMPL_NULL); + _othr.impl_ == nullptr, TEST_CHECKSUM_COMPARE_INCOMING_IMPL_NULL); TEST_THROW_ERROR_if(impl_ != nullptr, TEST_CHECKSUM_COMPARE_IMPL_ALREADY_SET); impl_ = _othr.impl_; diff --git a/Test/TestChecksumCompare.hh b/Test/TestChecksumCompare.hh index 9c627df7c3ecaab66530037efa6a4203b9a6251d..45437e2c6d27a7a4d6c3684ab8612a7868efca98 100644 --- a/Test/TestChecksumCompare.hh +++ b/Test/TestChecksumCompare.hh @@ -41,15 +41,14 @@ linked statically, i.e., they share the same binary. class Compare { public: + //! Destroy the owned instance + ~Compare(); + //! Make and store the unique instance - static void make(); + void make(); //! Set an instance made in another binary - static void set(Compare&); - -public: - //! Destroy the owned instance - ~Compare(); + void set(Compare&); //! Set the report pair to compare void set_reports(const fs::path& _left_path, const fs::path& _right_path); @@ -76,8 +75,8 @@ private: private: class Impl; - static Impl* impl_; // shared implementation pointer - static bool owned_; // own implementation or not + Impl* impl_ = nullptr; // shared implementation + bool owned_ = false; // own implementation or not }; /*!