From 8ef500bc0b259cf6a73772148153b759e954297e Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Fri, 22 Apr 2022 23:52:29 -0700 Subject: C++11 introduced actual unicode string literals. I'm moving things to take advantage of that. It's pretty cool! --- src/unstable/text.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/unstable/text.cpp') diff --git a/src/unstable/text.cpp b/src/unstable/text.cpp index be4c10f..d8cf15c 100644 --- a/src/unstable/text.cpp +++ b/src/unstable/text.cpp @@ -19,6 +19,16 @@ Bu::Text::Text() : { } +Bu::Text::Text( const CodePoint *rSrc ) : + pData( NULL ), + bIsBmpOnly( true ), + iSize( 0 ) +{ + for(; rSrc[iSize]; iSize++ ) {} + pData = new CodePoint[iSize+1]; + memcpy( pData, rSrc, iSize+1 ); +} + Bu::Text::Text( const Text &rSrc ) : pData( NULL ), bIsBmpOnly( rSrc.bIsBmpOnly ), -- cgit v1.2.3