From 742981209de20d041df4d9aace0f196c2df8d7e7 Mon Sep 17 00:00:00 2001 From: Miguel Company Date: Tue, 26 Nov 2024 14:49:50 +0100 Subject: [PATCH] Refs #22284. Fix issue. Signed-off-by: Miguel Company --- include/fastcdr/Cdr.h | 6 ------ include/fastcdr/FastCdr.h | 6 ------ 2 files changed, 12 deletions(-) diff --git a/include/fastcdr/Cdr.h b/include/fastcdr/Cdr.h index 0f836ee1..c3754ca8 100644 --- a/include/fastcdr/Cdr.h +++ b/include/fastcdr/Cdr.h @@ -689,12 +689,6 @@ class Cdr Cdr& serialize( const std::string& string_t) { - // An empty string is serialized as a 0 length string. - if (string_t.empty()) - { - return serialize(static_cast(0)); - } - // Check there are no null characters in the string. const char* c_str = string_t.c_str(); const auto str_len = strlen(c_str); diff --git a/include/fastcdr/FastCdr.h b/include/fastcdr/FastCdr.h index 42e73252..1a26b9c7 100644 --- a/include/fastcdr/FastCdr.h +++ b/include/fastcdr/FastCdr.h @@ -891,12 +891,6 @@ class Cdr_DllAPI FastCdr FastCdr& serialize( const std::string& string_t) { - // An empty string is serialized as a 0 length string. - if (string_t.empty()) - { - return serialize(static_cast(0)); - } - // Check there are no null characters in the string. const char* c_str = string_t.c_str(); const auto str_len = strlen(c_str);