summaryrefslogtreecommitdiff
path: root/src/mir_core
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-08-15 20:24:32 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-08-15 20:24:32 +0300
commitdd4003be6e318e712cb556c0d091bfae3a45fcd4 (patch)
tree619b59cdfc5ba79c9e517b3df44397df25a6c773 /src/mir_core
parent7553bf0eb331d57cdc4f5003ddcabb74187f04da (diff)
command line parameters - code cleaning
Diffstat (limited to 'src/mir_core')
-rw-r--r--src/mir_core/src/cmdline.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mir_core/src/cmdline.cpp b/src/mir_core/src/cmdline.cpp
index 1f1616c81c..1589535069 100644
--- a/src/mir_core/src/cmdline.cpp
+++ b/src/mir_core/src/cmdline.cpp
@@ -28,10 +28,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CmdLineParam
{
__inline CmdLineParam(const wchar_t *_name, const wchar_t *_value) :
- name(_name), value(_value)
+ name(mir_wstrdup(_name)), value(mir_wstrdup(_value))
{}
- const wchar_t *name, *value;
+ ptrW name, value;
};
static int CompareParams(const CmdLineParam *p1, const CmdLineParam *p2)
@@ -85,5 +85,5 @@ MIR_CORE_DLL(const wchar_t*) CmdLine_GetOption(const wchar_t* ptszParameter)
{
CmdLineParam tmp(ptszParameter, nullptr);
int idx = arParams.getIndex(&tmp);
- return (idx == -1) ? nullptr : arParams[idx].value;
+ return (idx == -1) ? nullptr : arParams[idx].value.get();
}