made UTF-8 tables const

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48322 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2007-08-22 09:30:40 +00:00
parent ac2d749e88
commit 1774c3c535
3 changed files with 4 additions and 4 deletions

View File

@@ -70,7 +70,7 @@ struct WXDLLIMPEXP_BASE wxStringOperationsUtf8
#endif #endif
// table of offsets to skip forward when iterating over UTF-8 sequence // table of offsets to skip forward when iterating over UTF-8 sequence
static unsigned char ms_utf8IterTable[256]; static const unsigned char ms_utf8IterTable[256];
template<typename Iterator> template<typename Iterator>

View File

@@ -703,7 +703,7 @@ size_t wxMBConvUTF7::WC2MB(char *buf, const wchar_t *psz, size_t n) const
// UTF-8 // UTF-8
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
static wxUint32 utf8_max[]= static const wxUint32 utf8_max[]=
{ 0x7f, 0x7ff, 0xffff, 0x1fffff, 0x3ffffff, 0x7fffffff, 0xffffffff }; { 0x7f, 0x7ff, 0xffff, 0x1fffff, 0x3ffffff, 0x7fffffff, 0xffffffff };
// boundaries of the private use area we use to (temporarily) remap invalid // boundaries of the private use area we use to (temporarily) remap invalid
@@ -712,7 +712,7 @@ const wxUint32 wxUnicodePUA = 0x100000;
const wxUint32 wxUnicodePUAEnd = wxUnicodePUA + 256; const wxUint32 wxUnicodePUAEnd = wxUnicodePUA + 256;
// this table gives the length of the UTF-8 encoding from its first character: // this table gives the length of the UTF-8 encoding from its first character:
unsigned char tableUtf8Lengths[256] = { const unsigned char tableUtf8Lengths[256] = {
// single-byte sequences (ASCII): // single-byte sequences (ASCII):
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 00..0F 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 00..0F
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 10..1F 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 10..1F

View File

@@ -34,7 +34,7 @@
// UTF-8 sequences lengths // UTF-8 sequences lengths
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
unsigned char wxStringOperationsUtf8::ms_utf8IterTable[256] = { const unsigned char wxStringOperationsUtf8::ms_utf8IterTable[256] = {
// single-byte sequences (ASCII): // single-byte sequences (ASCII):
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 00..0F 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 00..0F
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 10..1F 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 10..1F