From 2d74dec3ec9fe4e0fa09f6315185849aa8077a6f Mon Sep 17 00:00:00 2001 From: JesusPoderoso Date: Wed, 10 Jul 2024 10:30:03 +0200 Subject: [PATCH] Refs #21329: Update Impl Signed-off-by: JesusPoderoso --- src/cpp/fastdds/publisher/DataWriterImpl.cpp | 12 ++++++------ src/cpp/fastdds/publisher/DataWriterImpl.hpp | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/cpp/fastdds/publisher/DataWriterImpl.cpp b/src/cpp/fastdds/publisher/DataWriterImpl.cpp index 5b4e8361361..5b28f70402e 100644 --- a/src/cpp/fastdds/publisher/DataWriterImpl.cpp +++ b/src/cpp/fastdds/publisher/DataWriterImpl.cpp @@ -634,29 +634,29 @@ ReturnCode_t DataWriterImpl::discard_loan( return RETCODE_OK; } -bool DataWriterImpl::write( +ReturnCode_t DataWriterImpl::write( const void* const data) { if (writer_ == nullptr) { - return false; + return RETCODE_NOT_ENABLED; } EPROSIMA_LOG_INFO(DATA_WRITER, "Writing new data"); - return RETCODE_OK == create_new_change(ALIVE, data); + return create_new_change(ALIVE, data); } -bool DataWriterImpl::write( +ReturnCode_t DataWriterImpl::write( const void* const data, fastdds::rtps::WriteParams& params) { if (writer_ == nullptr) { - return false; + return RETCODE_NOT_ENABLED; } EPROSIMA_LOG_INFO(DATA_WRITER, "Writing new data with WriteParams"); - return RETCODE_OK == create_new_change_with_params(ALIVE, data, params); + return create_new_change_with_params(ALIVE, data, params); } ReturnCode_t DataWriterImpl::check_write_preconditions( diff --git a/src/cpp/fastdds/publisher/DataWriterImpl.hpp b/src/cpp/fastdds/publisher/DataWriterImpl.hpp index 102f2f6f071..7381286a291 100644 --- a/src/cpp/fastdds/publisher/DataWriterImpl.hpp +++ b/src/cpp/fastdds/publisher/DataWriterImpl.hpp @@ -164,9 +164,9 @@ class DataWriterImpl : protected rtps::IReaderDataFilter * * @param data Pointer to the data. * - * @return true if data is correctly delivered to the lower layers, false otherwise. + * @return any of the standard return codes. */ - bool write( + ReturnCode_t write( const void* const data); /** @@ -175,9 +175,9 @@ class DataWriterImpl : protected rtps::IReaderDataFilter * @param data Pointer to the data. * @param params Extra write parameters. * - * @return true if data is correctly delivered to the lower layers, false otherwise. + * @return any of the standard return codes. */ - bool write( + ReturnCode_t write( const void* const data, fastdds::rtps::WriteParams& params);