diff options
author | Kacper Michajłow <kasper93@gmail.com> | 2017-08-21 20:51:03 +0300 |
---|---|---|
committer | Kacper Michajłow <kasper93@gmail.com> | 2017-08-21 20:51:03 +0300 |
commit | 55b2513935d55059e27ffe708363618b228db338 (patch) | |
tree | f261a84fee8467f305644dfba59642985f6d770a | |
parent | 29ba6b5d061d92c74be1923c24bf7b3325164c5b (diff) |
Add const for strings initialized with literals.mpc-hc-1.7.13-1mpc-hc
-rw-r--r-- | RFS.cpp | 1 | ||||
-rw-r--r-- | RFS.h | 2 | ||||
-rw-r--r-- | Utils.cpp | 10 | ||||
-rw-r--r-- | Utils.h | 2 |
4 files changed, 8 insertions, 7 deletions
@@ -88,6 +88,7 @@ int g_cTemplates = sizeof (g_Templates) / sizeof (g_Templates [0]); #endif /* static */ +const file_type_t CRARFileSource::s_file_types [] = { { "avi", &MEDIASUBTYPE_Avi }, @@ -69,7 +69,7 @@ private: LPWSTR m_file_name; CRFSFile *m_file; - static file_type_t s_file_types []; + static const file_type_t s_file_types []; }; #endif // RFS_H @@ -22,7 +22,7 @@ #include "Utils.h" #include "RFS.h" -void ErrorMsg (DWORD errorCode, wchar_t *format, ...) +void ErrorMsg (DWORD errorCode, const wchar_t *format, ...) { wchar_t buffer [1024]; wchar_t *end; @@ -53,7 +53,7 @@ void ErrorMsg (DWORD errorCode, wchar_t *format, ...) #ifdef _DEBUG -static wchar_t *mhd_flags [] = +static const wchar_t *const mhd_flags [] = { L"MHD_VOLUME", L"MHD_COMMENT", @@ -67,7 +67,7 @@ static wchar_t *mhd_flags [] = L"MHD_ENCRYPTVER" }; -static wchar_t *lhd_flags1 [] = +static const wchar_t *const lhd_flags1 [] = { L"LHD_SPLIT_BEFORE", L"LHD_SPLIT_AFTER", @@ -76,7 +76,7 @@ static wchar_t *lhd_flags1 [] = L"LHD_SOLID" }; -static wchar_t *lhd_flags2 [] = +static const wchar_t *const lhd_flags2 [] = { L"LHD_LARGE", L"LHD_UNICODE", @@ -86,7 +86,7 @@ static wchar_t *lhd_flags2 [] = L"LHD_EXTFLAGS" }; -static wchar_t *earc_flags [] = +static const wchar_t *const earc_flags [] = { L"EARC_NEXT_VOLUME", L"EARC_DATACRC", @@ -20,7 +20,7 @@ #include <windows.h> -void ErrorMsg (DWORD errorCode, wchar_t *format, ...); +void ErrorMsg (DWORD errorCode, const wchar_t *format, ...); #ifdef _DEBUG #include "RAR.h" |