From 4442171b8a841cc2ada4d24009068d312f594602 Mon Sep 17 00:00:00 2001 From: Balazs Racz Date: Sat, 22 Feb 2020 16:47:39 +0100 Subject: [PATCH] Fix warnings in GCC9 compilation. --- tinyutf8.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tinyutf8.h b/tinyutf8.h index 53f3d69..df19b62 100644 --- a/tinyutf8.h +++ b/tinyutf8.h @@ -844,7 +844,7 @@ class utf8_string utf8_string( const utf8_string& str ) { // Copy data - std::memcpy( this , &str , sizeof(utf8_string) ); + std::memcpy( (void*)this , &str , sizeof(utf8_string) ); // Create a new buffer, if sso is not active if( str.sso_inactive() ){ @@ -861,7 +861,7 @@ class utf8_string * @param str The utf8_string to move from */ inline utf8_string( utf8_string&& str ){ - std::memcpy( this , &str , sizeof(utf8_string) ); // Copy data + std::memcpy( (void*)this , &str , sizeof(utf8_string) ); // Copy data str.set_sso_data_len(0); // Reset old string } /**