diff options
Diffstat (limited to 'c/main.cpp')
-rw-r--r-- | c/main.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -56,7 +56,7 @@ static void UpdateTheme(); void OnTerminate() noexcept { const wchar_t* what = L"an exception"; - wstring_owner why; + wchar_ptr why; try { std::rethrow_exception(std::current_exception()); @@ -65,14 +65,14 @@ void OnTerminate() noexcept try { why = PlString(t); } catch (...) {} } catch (const Win32Error& e) { what = L"a Windows error"; - try { why = wstring_owner::copy(e.WhatW()); } catch (...) {} + try { why = wchar_ptr::copy(e.WhatW()); } catch (...) {} } catch (const std::exception& e) { - try { why = wstring_owner::from_narrow(e.what()); } catch (...) {} + try { why = wchar_ptr::from_narrow(e.what()); } catch (...) {} } catch (...) {} wchar_t msg[256] = {0}; if (why) - wszf(msg, L"Episode Browser was terminated due to %s: %s", what, why.p); + wszf(msg, L"Episode Browser was terminated due to %s: %s", what, static_cast<wchar_t*>(why)); else wszf(msg, L"Episode Browser was terminated due to %s.", what); @@ -493,13 +493,13 @@ void WaitFor(const char* mod, const char* pred) static atom_t aThread; static int bActive; static int iTimer; - static wstring_owner activePred; + static wchar_ptr activePred; if (bActive) { wchar_t msg[256] = {0}; wszf(msg, L"Another task (%s) is active. " L"Do you want to cancel the existing task and start a new one?", - activePred.p); + static_cast<wchar_t*>(activePred)); if (EBMessageBox(msg, L"Error", MB_YESNO|MB_ICONWARNING) != IDYES) return; KillTimer(NULL, iTimer); @@ -529,7 +529,7 @@ void WaitFor(const char* mod, const char* pred) Plx(mod,"thread_create",pred,&aThread); SendMessage(g_hWndStatus, SB_SETTEXT, MAKEWPARAM(1,0), (LPARAM)L"."); if (prefer(iTimer = SetTimer(NULL, -1, 500, proc))) { - activePred = wstring_owner::from_narrow(pred); + activePred = wchar_ptr::from_narrow(pred); bActive = 1; } } |