From d0d034e141783ebc37d214a78489153a1f541dd6 Mon Sep 17 00:00:00 2001 From: tftzee <49162693+rex-schilasky@users.noreply.github.com> Date: Wed, 15 May 2024 10:27:47 +0200 Subject: [PATCH] eCAL::Finalize() fixed (no more parameter) --- ecal/core/include/ecal/cimpl/ecal_core_cimpl.h | 4 +--- ecal/core/src/cimpl/ecal_core_cimpl.cpp | 4 ++-- ecal/tests/c/core_test/src/core_test.cpp | 12 ++++++------ 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/ecal/core/include/ecal/cimpl/ecal_core_cimpl.h b/ecal/core/include/ecal/cimpl/ecal_core_cimpl.h index 6be50fb54b..109a1e449a 100644 --- a/ecal/core/include/ecal/cimpl/ecal_core_cimpl.h +++ b/ecal/core/include/ecal/cimpl/ecal_core_cimpl.h @@ -83,11 +83,9 @@ extern "C" /** * @brief Finalize eCAL API. * - * @param components_ Defines which component to initialize (not yet supported). - * * @return Zero if succeeded, 1 if already finalized, -1 if failed. **/ - ECALC_API int eCAL_Finalize(unsigned int components_); + ECALC_API int eCAL_Finalize(); /** * @brief Check eCAL initialize state. diff --git a/ecal/core/src/cimpl/ecal_core_cimpl.cpp b/ecal/core/src/cimpl/ecal_core_cimpl.cpp index 2b6b51434d..ead763f96d 100644 --- a/ecal/core/src/cimpl/ecal_core_cimpl.cpp +++ b/ecal/core/src/cimpl/ecal_core_cimpl.cpp @@ -56,9 +56,9 @@ extern "C" return(eCAL::SetUnitName(unit_name_)); } - ECALC_API int eCAL_Finalize(unsigned int components_) + ECALC_API int eCAL_Finalize() { - return(eCAL::Finalize(components_)); + return(eCAL::Finalize()); } ECALC_API int eCAL_IsInitialized(unsigned int component_) diff --git a/ecal/tests/c/core_test/src/core_test.cpp b/ecal/tests/c/core_test/src/core_test.cpp index 2eff646da6..5f04527770 100644 --- a/ecal/tests/c/core_test/src/core_test.cpp +++ b/ecal/tests/c/core_test/src/core_test.cpp @@ -58,19 +58,19 @@ TEST(core_c_core, InitializeFinalize) EXPECT_EQ(1, eCAL_Initialize(0, nullptr, "initialize_test", 0)); // finalize eCAL API we expect return value 0 even it will not be really finalized because it's 2 times initialzed and 1 time finalized - EXPECT_EQ(0, eCAL_Finalize(0)); + EXPECT_EQ(0, eCAL_Finalize()); // Is eCAL API initialized ? yes it' still initialized EXPECT_EQ(1, eCAL_IsInitialized(0)); // finalize eCAL API we expect return value 0 because now it will be finalized - EXPECT_EQ(0, eCAL_Finalize(0)); + EXPECT_EQ(0, eCAL_Finalize()); // Is eCAL API initialized ? no EXPECT_EQ(0, eCAL_IsInitialized(0)); // finalize eCAL API we expect return value 1 because it was finalized before - EXPECT_EQ(1, eCAL_Finalize(0)); + EXPECT_EQ(1, eCAL_Finalize()); } TEST(core_c_core, MultipleInitializeFinalize) @@ -82,7 +82,7 @@ TEST(core_c_core, MultipleInitializeFinalize) EXPECT_EQ(0, eCAL_Initialize(0, nullptr, "multiple_initialize_finalize_test", 0)); // finalize eCAL API - EXPECT_EQ(0, eCAL_Finalize(0)); + EXPECT_EQ(0, eCAL_Finalize()); } } @@ -148,7 +148,7 @@ TEST(core_c_core, SetGetUnitName) EXPECT_STREQ("unit name", unit_name); // finalize eCAL API we expect return value 0 because it will be finalized - EXPECT_EQ(0, eCAL_Finalize(0)); + EXPECT_EQ(0, eCAL_Finalize()); } TEST(core_c_core, eCAL_Ok) @@ -163,7 +163,7 @@ TEST(core_c_core, eCAL_Ok) EXPECT_EQ(1, eCAL_Ok()); // finalize eCAL API we expect return value 0 because it will be finalized - EXPECT_EQ(0, eCAL_Finalize(0)); + EXPECT_EQ(0, eCAL_Finalize()); // check finalized eCAL, should not be okay EXPECT_EQ(0, eCAL_Ok());