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);