From 9ce55e2efc6d4f5e53ef3c1bf9f1dd95e77a7b08 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 30 Oct 2019 16:26:15 +0300 Subject: fix for CMOption<> prototype --- include/m_gui.h | 48 +++++++++++++++++++++--------------------- libs/win32/mir_app.lib | Bin 200782 -> 200782 bytes libs/win64/mir_app.lib | Bin 196400 -> 196400 bytes src/mir_app/src/mir_app.def | 2 +- src/mir_app/src/mir_app64.def | 2 +- src/mir_app/src/proto_ui.cpp | 2 +- 6 files changed, 27 insertions(+), 27 deletions(-) diff --git a/include/m_gui.h b/include/m_gui.h index ce489d7520..04f1d51f1f 100644 --- a/include/m_gui.h +++ b/include/m_gui.h @@ -49,11 +49,11 @@ struct CMDBTraits<1> { typedef BYTE DBType; enum { DBTypeId = DBVT_BYTE }; - static __forceinline DBType Get(char *szModule, char *szSetting, DBType value) + static __forceinline DBType Get(const char *szModule, const char *szSetting, DBType value) { return db_get_b(0, szModule, szSetting, value); } - static __forceinline void Set(char *szModule, char *szSetting, DBType value) + static __forceinline void Set(const char *szModule, const char *szSetting, DBType value) { db_set_b(0, szModule, szSetting, value); } @@ -64,11 +64,11 @@ struct CMDBTraits<2> { typedef WORD DBType; enum { DBTypeId = DBVT_WORD }; - static __forceinline DBType Get(char *szModule, char *szSetting, DBType value) + static __forceinline DBType Get(const char *szModule, const char *szSetting, DBType value) { return db_get_w(0, szModule, szSetting, value); } - static __forceinline void Set(char *szModule, char *szSetting, DBType value) + static __forceinline void Set(const char *szModule, const char *szSetting, DBType value) { db_set_w(0, szModule, szSetting, value); } @@ -79,11 +79,11 @@ struct CMDBTraits<4> { typedef DWORD DBType; enum { DBTypeId = DBVT_DWORD }; - static __forceinline DBType Get(char *szModule, char *szSetting, DBType value) + static __forceinline DBType Get(const char *szModule, const char *szSetting, DBType value) { return db_get_dw(0, szModule, szSetting, value); } - static __forceinline void Set(char *szModule, char *szSetting, DBType value) + static __forceinline void Set(const char *szModule, const char *szSetting, DBType value) { db_set_dw(0, szModule, szSetting, value); } @@ -94,11 +94,11 @@ struct CMDBTraits<8> { typedef DWORD DBType; enum { DBTypeId = DBVT_DWORD }; - static __forceinline DBType Get(char *szModule, char *szSetting, DBType value) + static __forceinline DBType Get(const char *szModule, const char *szSetting, DBType value) { return db_get_dw(0, szModule, szSetting, value); } - static __forceinline void Set(char *szModule, char *szSetting, DBType value) + static __forceinline void Set(const char *szModule, const char *szSetting, DBType value) { db_set_dw(0, szModule, szSetting, value); } @@ -111,16 +111,16 @@ public: __forceinline const char* GetDBSettingName() const { return m_szSetting; } protected: - __forceinline CMOptionBase(PROTO_INTERFACE *proto, char *szSetting) : + __forceinline CMOptionBase(PROTO_INTERFACE *proto, const const char *szSetting) : m_szModuleName(proto->m_szModuleName), m_szSetting(szSetting) {} - __forceinline CMOptionBase(char *module, char *szSetting) : + __forceinline CMOptionBase(const char *module, const const char *szSetting) : m_szModuleName(module), m_szSetting(szSetting) {} - char *m_szModuleName; - char *m_szSetting; + const char *m_szModuleName; + const char *m_szSetting; }; template @@ -129,11 +129,11 @@ class CMOption : public CMOptionBase public: typedef T Type; - __forceinline CMOption(PROTO_INTERFACE *proto, char *szSetting, Type defValue) : + __forceinline CMOption(PROTO_INTERFACE *proto, const const char *szSetting, Type defValue) : CMOptionBase(proto, szSetting), m_default(defValue) {} - __forceinline CMOption(char *szModule, char *szSetting, Type defValue) : + __forceinline CMOption(const const char *szModule, const const char *szSetting, Type defValue) : CMOptionBase(szModule, szSetting), m_default(defValue) {} @@ -166,11 +166,11 @@ public: typedef char Type; - __forceinline CMOption(PROTO_INTERFACE *proto, char *szSetting, const Type *defValue = nullptr) : + __forceinline CMOption(PROTO_INTERFACE *proto, const const char *szSetting, const Type *defValue = nullptr) : CMOptionBase(proto, szSetting), m_default(defValue) {} - __forceinline CMOption(char *szModule, char *szSetting, const Type *defValue = nullptr) : + __forceinline CMOption(const const char *szModule, const const char *szSetting, const Type *defValue = nullptr) : CMOptionBase(szModule, szSetting), m_default(defValue) {} @@ -204,11 +204,11 @@ public: typedef wchar_t Type; - __forceinline CMOption(PROTO_INTERFACE *proto, char *szSetting, const Type *defValue = nullptr) : + __forceinline CMOption(PROTO_INTERFACE *proto, const const char *szSetting, const Type *defValue = nullptr) : CMOptionBase(proto, szSetting), m_default(defValue) {} - __forceinline CMOption(char *szModule, char *szSetting, const Type *defValue = nullptr) : + __forceinline CMOption(const const char *szModule, const const char *szSetting, const Type *defValue = nullptr) : CMOptionBase(szModule, szSetting), m_default(defValue) {} @@ -323,8 +323,8 @@ class MIR_CORE_EXPORT CDbLink : public CDataLink DBVARIANT dbv; public: - CDbLink(const char *szModule, const char *szSetting, BYTE type, DWORD iValue); - CDbLink(const char *szModule, const char *szSetting, BYTE type, wchar_t *szValue); + CDbLink(const const char *szModule, const const char *szSetting, BYTE type, DWORD iValue); + CDbLink(const const char *szModule, const const char *szSetting, BYTE type, wchar_t *szValue); ~CDbLink(); DWORD LoadInt() override; @@ -450,8 +450,8 @@ protected: void AddTimer(CTimer *timer); // options support - void CreateLink(CCtrlData& ctrl, const char *szSetting, BYTE type, DWORD iValue); - void CreateLink(CCtrlData& ctrl, const char *szSetting, wchar_t *szValue); + void CreateLink(CCtrlData& ctrl, const const char *szSetting, BYTE type, DWORD iValue); + void CreateLink(CCtrlData& ctrl, const const char *szSetting, wchar_t *szValue); template __inline void CreateLink(CCtrlData& ctrl, CMOption &option) @@ -1467,8 +1467,8 @@ class MIR_APP_EXPORT CProtoIntDlgBase : public CDlgBase public: CProtoIntDlgBase(PROTO_INTERFACE *proto, int idDialog); - void CreateLink(CCtrlData& ctrl, char *szSetting, BYTE type, DWORD iValue); - void CreateLink(CCtrlData& ctrl, const char *szSetting, wchar_t *szValue); + void CreateLink(CCtrlData& ctrl, const char *szSetting, BYTE type, DWORD iValue); + void CreateLink(CCtrlData& ctrl, const const char *szSetting, wchar_t *szValue); template __inline void CreateLink(CCtrlData& ctrl, CMOption &option) diff --git a/libs/win32/mir_app.lib b/libs/win32/mir_app.lib index d48b1789d0..0fcf41be8e 100644 Binary files a/libs/win32/mir_app.lib and b/libs/win32/mir_app.lib differ diff --git a/libs/win64/mir_app.lib b/libs/win64/mir_app.lib index 2918192086..583aee5021 100644 Binary files a/libs/win64/mir_app.lib and b/libs/win64/mir_app.lib differ diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def index 228fe4c0a6..cc0971516c 100644 --- a/src/mir_app/src/mir_app.def +++ b/src/mir_app/src/mir_app.def @@ -39,7 +39,7 @@ Button_SetSkin_IcoLib @24 ?AuthRequest@PROTO_INTERFACE@@UAEHIPB_W@Z @38 NONAME ?Authorize@PROTO_INTERFACE@@UAEHI@Z @39 NONAME ?CreateExtendedSearchUI@PROTO_INTERFACE@@UAEPAUHWND__@@PAU2@@Z @40 NONAME -?CreateLink@CProtoIntDlgBase@@QAEXAAVCCtrlData@@PADEK@Z @41 NONAME +?CreateLink@CProtoIntDlgBase@@QAEXAAVCCtrlData@@PBDEK@Z @41 NONAME ?CreateLink@CProtoIntDlgBase@@QAEXAAVCCtrlData@@PBDPA_W@Z @42 NONAME ?DlgProc@CProtoIntDlgBase@@MAEHIIJ@Z @43 NONAME ?FileAllow@PROTO_INTERFACE@@UAEPAXIPAXPB_W@Z @44 NONAME diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def index 02356fb3bb..7bf019dc3e 100644 --- a/src/mir_app/src/mir_app64.def +++ b/src/mir_app/src/mir_app64.def @@ -39,7 +39,7 @@ Button_SetSkin_IcoLib @24 ?AuthRequest@PROTO_INTERFACE@@UEAAHIPEB_W@Z @38 NONAME ?Authorize@PROTO_INTERFACE@@UEAAHI@Z @39 NONAME ?CreateExtendedSearchUI@PROTO_INTERFACE@@UEAAPEAUHWND__@@PEAU2@@Z @40 NONAME -?CreateLink@CProtoIntDlgBase@@QEAAXAEAVCCtrlData@@PEADEK@Z @41 NONAME +?CreateLink@CProtoIntDlgBase@@QEAAXAEAVCCtrlData@@PEBDEK@Z @41 NONAME ?CreateLink@CProtoIntDlgBase@@QEAAXAEAVCCtrlData@@PEBDPEA_W@Z @42 NONAME ?DlgProc@CProtoIntDlgBase@@MEAA_JI_K_J@Z @43 NONAME ?FileAllow@PROTO_INTERFACE@@UEAAPEAXIPEAXPEB_W@Z @44 NONAME diff --git a/src/mir_app/src/proto_ui.cpp b/src/mir_app/src/proto_ui.cpp index 5133e20dad..b50fcfcbb2 100644 --- a/src/mir_app/src/proto_ui.cpp +++ b/src/mir_app/src/proto_ui.cpp @@ -42,7 +42,7 @@ CProtoIntDlgBase::CProtoIntDlgBase(PROTO_INTERFACE *proto, int idDialog) : { } -void CProtoIntDlgBase::CreateLink(CCtrlData& ctrl, char *szSetting, BYTE type, DWORD iValue) +void CProtoIntDlgBase::CreateLink(CCtrlData& ctrl, const char *szSetting, BYTE type, DWORD iValue) { ctrl.CreateDbLink(m_proto_interface->m_szModuleName, szSetting, type, iValue); } -- cgit v1.2.3