| LEFT | RIGHT |
| 1 /** | 1 /** |
| 2 * \file ATL_Deprecate.cpp Transient functions used during the ATL removal proce
ss. | 2 * \file ATL_Deprecate.cpp Transient functions used during the ATL removal proce
ss. |
| 3 */ | 3 */ |
| 4 | 4 |
| 5 #include "ATL_Deprecate.h" | 5 #include "ATL_Deprecate.h" |
| 6 | 6 |
| 7 std::wstring to_wstring(ATL::CString& s) | 7 std::wstring to_wstring(const ATL::CString& s) |
| 8 { | 8 { |
| 9 std::wstring result(s.GetBuffer()); | 9 std::wstring result(static_cast<const wchar_t *>(s)); |
| 10 s.ReleaseBuffer(); | |
| 11 return result; | 10 return result; |
| 12 } | 11 } |
| 13 | |
| 14 | 12 |
| 15 ATL::CString to_CString(const std::wstring& s) | 13 ATL::CString to_CString(const std::wstring& s) |
| 16 { | 14 { |
| 17 return ATL::CString(s.c_str()); | 15 return ATL::CString(s.c_str()); |
| 18 } | 16 } |
| LEFT | RIGHT |