From 10f7d3569447b8aaf2c61ee84bc19f0edef12728 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 16 Jul 2017 16:18:40 +0200 Subject: [PATCH] Remove unwanted CR characters from MSW OLE source file Somehow recent changes to this file added CRs (^M) characters to the ends of some lines, remove them to avoid having a mix of Unix and DOS EOLs in the same file. No real changes. --- src/msw/ole/oleutils.cpp | 50 ++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/src/msw/ole/oleutils.cpp b/src/msw/ole/oleutils.cpp index 5bce2f3062..21bf29fb17 100644 --- a/src/msw/ole/oleutils.cpp +++ b/src/msw/ole/oleutils.cpp @@ -70,38 +70,38 @@ WXDLLEXPORT wxString wxConvertStringFromOle(BSTR bStr) // ---------------------------------------------------------------------------- // wxBasicString // ---------------------------------------------------------------------------- -void wxBasicString::AssignFromString(const wxString& str) -{ - SysFreeString(m_bstrBuf); - m_bstrBuf = SysAllocString(str.wc_str(*wxConvCurrent)); -} - -BSTR wxBasicString::Detach() -{ - BSTR bstr = m_bstrBuf; - - m_bstrBuf = NULL; - - return bstr; +void wxBasicString::AssignFromString(const wxString& str) +{ + SysFreeString(m_bstrBuf); + m_bstrBuf = SysAllocString(str.wc_str(*wxConvCurrent)); } -BSTR* wxBasicString::ByRef() -{ +BSTR wxBasicString::Detach() +{ + BSTR bstr = m_bstrBuf; + + m_bstrBuf = NULL; + + return bstr; +} + +BSTR* wxBasicString::ByRef() +{ wxASSERT_MSG(!m_bstrBuf, - wxS("Can't get direct access to initialized BSTR")); - return &m_bstrBuf; + wxS("Can't get direct access to initialized BSTR")); + return &m_bstrBuf; } wxBasicString& wxBasicString::operator=(const wxBasicString& src) { - if ( this != &src ) - { - wxCHECK_MSG(m_bstrBuf == NULL || m_bstrBuf != src.m_bstrBuf, - *this, wxS("Attempting to assign already owned BSTR")); - SysFreeString(m_bstrBuf); - m_bstrBuf = src.Copy(); - } - + if ( this != &src ) + { + wxCHECK_MSG(m_bstrBuf == NULL || m_bstrBuf != src.m_bstrBuf, + *this, wxS("Attempting to assign already owned BSTR")); + SysFreeString(m_bstrBuf); + m_bstrBuf = src.Copy(); + } + return *this; }