From 1774c3c535957de3ba1ca85fce944767d40bdcb2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Wed, 22 Aug 2007 09:30:40 +0000 Subject: [PATCH] made UTF-8 tables const git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48322 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/stringops.h | 2 +- src/common/strconv.cpp | 4 ++-- src/common/stringops.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/wx/stringops.h b/include/wx/stringops.h index 1aa44e5f67..2e36900adc 100644 --- a/include/wx/stringops.h +++ b/include/wx/stringops.h @@ -70,7 +70,7 @@ struct WXDLLIMPEXP_BASE wxStringOperationsUtf8 #endif // 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 diff --git a/src/common/strconv.cpp b/src/common/strconv.cpp index f2364b7fc3..eeaa071f31 100644 --- a/src/common/strconv.cpp +++ b/src/common/strconv.cpp @@ -703,7 +703,7 @@ size_t wxMBConvUTF7::WC2MB(char *buf, const wchar_t *psz, size_t n) const // UTF-8 // ---------------------------------------------------------------------------- -static wxUint32 utf8_max[]= +static const wxUint32 utf8_max[]= { 0x7f, 0x7ff, 0xffff, 0x1fffff, 0x3ffffff, 0x7fffffff, 0xffffffff }; // 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; // 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): 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 diff --git a/src/common/stringops.cpp b/src/common/stringops.cpp index 08d451492e..ae182c6cfa 100644 --- a/src/common/stringops.cpp +++ b/src/common/stringops.cpp @@ -34,7 +34,7 @@ // UTF-8 sequences lengths // --------------------------------------------------------------------------- -unsigned char wxStringOperationsUtf8::ms_utf8IterTable[256] = { +const unsigned char wxStringOperationsUtf8::ms_utf8IterTable[256] = { // 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, // 10..1F -- 2.45.2