Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/rarfilesource.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKacper Michajłow <kasper93@gmail.com>2017-08-21 20:51:03 +0300
committerKacper Michajłow <kasper93@gmail.com>2017-08-21 20:51:03 +0300
commit55b2513935d55059e27ffe708363618b228db338 (patch)
treef261a84fee8467f305644dfba59642985f6d770a
parent29ba6b5d061d92c74be1923c24bf7b3325164c5b (diff)
Add const for strings initialized with literals.mpc-hc-1.7.13-1mpc-hc
-rw-r--r--RFS.cpp1
-rw-r--r--RFS.h2
-rw-r--r--Utils.cpp10
-rw-r--r--Utils.h2
4 files changed, 8 insertions, 7 deletions
diff --git a/RFS.cpp b/RFS.cpp
index 62ef158..cb60044 100644
--- a/RFS.cpp
+++ b/RFS.cpp
@@ -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 },
diff --git a/RFS.h b/RFS.h
index 2370270..b5ef7ff 100644
--- a/RFS.h
+++ b/RFS.h
@@ -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
diff --git a/Utils.cpp b/Utils.cpp
index b54492b..26737ce 100644
--- a/Utils.cpp
+++ b/Utils.cpp
@@ -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",
diff --git a/Utils.h b/Utils.h
index 0e19dd8..cf57dfb 100644
--- a/Utils.h
+++ b/Utils.h
@@ -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"