]> git.saurik.com Git - wxWidgets.git/commitdiff
made UTF-8 tables const
authorVáclav Slavík <vslavik@fastmail.fm>
Wed, 22 Aug 2007 09:30:40 +0000 (09:30 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Wed, 22 Aug 2007 09:30:40 +0000 (09:30 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48322 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/stringops.h
src/common/strconv.cpp
src/common/stringops.cpp

index 1aa44e5f67e12ffd39aef628cd39d2d84fa6e3f2..2e36900adc7ecb90908c2c1ce709857ff1a7fcea 100644 (file)
@@ -70,7 +70,7 @@ struct WXDLLIMPEXP_BASE wxStringOperationsUtf8
 #endif
 
     // table of offsets to skip forward when iterating over UTF-8 sequence
 #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<typename Iterator>
 
 
     template<typename Iterator>
index f2364b7fc3f59994061dcd95eb97e12a94f8640d..eeaa071f3101c348f9ca430390622019f19f5e87 100644 (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 };
 
 // boundaries of the private use area we use to (temporarily) remap invalid
     { 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:
 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
     // 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
index 08d451492e813a0fd3ce9a655ccfec03ab9e3389..ae182c6cfa09f4079c3c8092baf20d80afdd0cc2 100644 (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):
     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
     // 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