diff options
author | chai <chaifix@163.com> | 2018-10-11 21:27:23 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-10-11 21:27:23 +0800 |
commit | f2c6791ab4f2f6c4d14aa425355cb6732898375c (patch) | |
tree | f934593870b45c7610b35ef52258a73b7d29109f | |
parent | 6905c3f85c2f405dd92daa8b946c8c3d45b86238 (diff) |
*update
-rw-r--r-- | libjin/Graphics/Unicode.cpp | 8 | ||||
-rw-r--r-- | libjin/Graphics/Unicode.h | 13 |
2 files changed, 14 insertions, 7 deletions
diff --git a/libjin/Graphics/Unicode.cpp b/libjin/Graphics/Unicode.cpp index 8c2b77d..ad7c6eb 100644 --- a/libjin/Graphics/Unicode.cpp +++ b/libjin/Graphics/Unicode.cpp @@ -46,13 +46,19 @@ namespace unicode const void* Utf16::decode(const void* data, unsigned int length, Codepoint* res) { + } ///////////////////////////////////////////////////////////////////////////// // iterator ///////////////////////////////////////////////////////////////////////////// - Codepoint unicode::Iterator::operator*() + Iterator::~Iterator() + { + delete _decoder; + } + + Codepoint Iterator::operator*() { } diff --git a/libjin/Graphics/Unicode.h b/libjin/Graphics/Unicode.h index ba4adf0..1ea3667 100644 --- a/libjin/Graphics/Unicode.h +++ b/libjin/Graphics/Unicode.h @@ -46,12 +46,13 @@ namespace unicode public: const void* decode(const void* data, unsigned int length, Codepoint* c) override; }; - + class Iterator { public: + Iterator(const Iterator& itor); Iterator(Encode encode, const void* data, unsigned int length); - ~Iterator(); + ~Iterator(); Codepoint get(); bool next(); @@ -63,10 +64,10 @@ namespace unicode void operator = (const Iterator& itor); private: - Decoder* _decoder; - const void* _data; // weak pointer - unsigned int _length; - const void* _p; + const Decoder* _decoder; // decoder + const void* _p; // pointer + const void* _data; // weak pointer + unsigned int _length; // data length }; |