Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tinyutf8.h
Original file line number Diff line number Diff line change
Expand Up @@ -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() ){
Expand All @@ -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
}
/**
Expand Down