diff --git a/include/fastcdr/Cdr.h b/include/fastcdr/Cdr.h index c86829b1..aa1916f9 100644 --- a/include/fastcdr/Cdr.h +++ b/include/fastcdr/Cdr.h @@ -2473,6 +2473,7 @@ class Cdr_DllAPI Cdr std::string& string_t, Endianness endianness) { +<<<<<<< HEAD bool auxSwap = m_swapBytes; m_swapBytes = (m_swapBytes && (static_cast(m_endianness) == endianness)) || (!m_swapBytes && (static_cast(m_endianness) != endianness)); @@ -2488,6 +2489,11 @@ class Cdr_DllAPI Cdr ex.raise(); } +======= + uint32_t length = 0; + const char* str = read_string(length); + value.assign(str, length); +>>>>>>> 5b8025b (Use assign for deserialize instead of temporary std::string (#241)) return *this; } diff --git a/include/fastcdr/FastCdr.h b/include/fastcdr/FastCdr.h index 8f0973e5..f435241b 100644 --- a/include/fastcdr/FastCdr.h +++ b/include/fastcdr/FastCdr.h @@ -1554,8 +1554,13 @@ class Cdr_DllAPI FastCdr std::string& string_t) { uint32_t length = 0; +<<<<<<< HEAD const char* str = readString(length); string_t = std::string(str, length); +======= + const char* str = read_string(length); + string_t.assign(str, length); +>>>>>>> 5b8025b (Use assign for deserialize instead of temporary std::string (#241)) return *this; }