diff options
author | Mike Buland <eichlan@xagasoft.com> | 2022-04-22 23:52:29 -0700 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2022-04-22 23:52:29 -0700 |
commit | 8ef500bc0b259cf6a73772148153b759e954297e (patch) | |
tree | d0c30837f15656f0b3bade6ce608d396551b78a4 /src/unstable/text.cpp | |
parent | 23d88aa2812c361d30abefeeb296548698409bf5 (diff) | |
download | libbu++-8ef500bc0b259cf6a73772148153b759e954297e.tar.gz libbu++-8ef500bc0b259cf6a73772148153b759e954297e.tar.bz2 libbu++-8ef500bc0b259cf6a73772148153b759e954297e.tar.xz libbu++-8ef500bc0b259cf6a73772148153b759e954297e.zip |
C++11 introduced actual unicode string literals.bigchange
I'm moving things to take advantage of that. It's pretty cool!
Diffstat (limited to 'src/unstable/text.cpp')
-rw-r--r-- | src/unstable/text.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
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() : | |||
19 | { | 19 | { |
20 | } | 20 | } |
21 | 21 | ||
22 | Bu::Text::Text( const CodePoint *rSrc ) : | ||
23 | pData( NULL ), | ||
24 | bIsBmpOnly( true ), | ||
25 | iSize( 0 ) | ||
26 | { | ||
27 | for(; rSrc[iSize]; iSize++ ) {} | ||
28 | pData = new CodePoint[iSize+1]; | ||
29 | memcpy( pData, rSrc, iSize+1 ); | ||
30 | } | ||
31 | |||
22 | Bu::Text::Text( const Text &rSrc ) : | 32 | Bu::Text::Text( const Text &rSrc ) : |
23 | pData( NULL ), | 33 | pData( NULL ), |
24 | bIsBmpOnly( rSrc.bIsBmpOnly ), | 34 | bIsBmpOnly( rSrc.bIsBmpOnly ), |