Mark some global vars as const and static and some static local vars as const

This way the compiler puts those vars in .rodata instead of .data and everyone
happy. (Plus we have one symbol less exported)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1241 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2008-10-07 13:45:34 +00:00
parent 92a718e3a6
commit 2573b6408e
4 changed files with 7 additions and 9 deletions

View File

@@ -14,7 +14,7 @@
using std::stringstream;
const char* g_szHTMLescapes[256] = {
static const char* const g_szHTMLescapes[256] = {
"�", 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0-9
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 10-19
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 20-29
@@ -716,7 +716,7 @@ CString CString::Base64Decode_n() const {
}
bool CString::Base64Encode(CString& sRet, unsigned int uWrap) const {
static char b64table[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
const char b64table[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
sRet.clear();
size_t len = size();
const unsigned char* input = (const unsigned char*) c_str();