Commit 40a59a96 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcp110: Use locale_string::assign instead of freeing and allocating new object…

msvcp110: Use locale_string::assign instead of freeing and allocating new object in _Locinfo__W_Getdays. Signed-off-by: 's avatarPiotr Caban <piotr@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 5a427e51
......@@ -86,9 +86,9 @@ LCID* __cdecl ___lc_handle_func(void);
#define locale_string_wchar _Yarn_wchar
#define locale_string_wchar_ctor(this) _Yarn_wchar_ctor(this)
#define locale_string_wchar_ctor_cstr(this,str) _Yarn_wchar_ctor(this); _Yarn_wchar_op_assign_cstr(this,str)
#define locale_string_wchar_dtor(this) _Yarn_wchar_dtor(this)
#define locale_string_wchar_c_str(this) _Yarn_wchar__C_str(this)
#define locale_string_wchar_assign(this,str) _Yarn_wchar_op_assign_cstr(this,str)
#endif
typedef int category;
......@@ -850,8 +850,7 @@ const wchar_t* __thiscall _Locinfo__W_Getdays(const _Locinfo *this)
TRACE("(%p)\n", this);
if(wdays) {
locale_string_wchar_dtor((locale_string_wchar *)&this->wdays);
locale_string_wchar_ctor_cstr((locale_string_wchar *)&this->wdays, wdays);
locale_string_wchar_assign((locale_string_wchar *)&this->wdays, wdays);
free(wdays);
}
......@@ -886,8 +885,7 @@ const wchar_t* __thiscall _Locinfo__W_Getmonths(const _Locinfo *this)
TRACE("(%p)\n", this);
if(wmonths) {
locale_string_wchar_dtor((locale_string_wchar *)&this->wmonths);
locale_string_wchar_ctor_cstr((locale_string_wchar *)&this->wmonths, wmonths);
locale_string_wchar_assign((locale_string_wchar *)&this->wmonths, wmonths);
free(wmonths);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment