diff options
Diffstat (limited to 'Source/cmCallVisualStudioMacro.cxx')
-rw-r--r-- | Source/cmCallVisualStudioMacro.cxx | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/Source/cmCallVisualStudioMacro.cxx b/Source/cmCallVisualStudioMacro.cxx index 9e152ff..94b6e18 100644 --- a/Source/cmCallVisualStudioMacro.cxx +++ b/Source/cmCallVisualStudioMacro.cxx @@ -43,8 +43,7 @@ static bool LogErrorsAsMessages; if (LogErrorsAsMessages) { \ std::ostringstream _hresult_oss; \ _hresult_oss.flags(std::ios::hex); \ - _hresult_oss << context << " failed HRESULT, hr = 0x" << hr \ - << std::endl; \ + _hresult_oss << context << " failed HRESULT, hr = 0x" << hr << '\n'; \ _hresult_oss.flags(std::ios::dec); \ _hresult_oss << __FILE__ << "(" << __LINE__ << ")"; \ cmSystemTools::Message(_hresult_oss.str()); \ @@ -98,32 +97,37 @@ HRESULT InstanceCallMacro(IDispatch* vsIDE, const std::string& macro, DISPATCH_METHOD, ¶ms, &result, &excep, &arg); std::ostringstream oss; - oss << std::endl; - oss << "Invoke(ExecuteCommand)" << std::endl; - oss << " Macro: " << macro << std::endl; - oss << " Args: " << args << std::endl; + /* clang-format off */ + oss << "\nInvoke(ExecuteCommand)\n" + " Macro: " << macro << "\n" + " Args: " << args << '\n'; + /* clang-format on */ if (DISP_E_EXCEPTION == hr) { - oss << "DISP_E_EXCEPTION EXCEPINFO:" << excep.wCode << std::endl; - oss << " wCode: " << excep.wCode << std::endl; - oss << " wReserved: " << excep.wReserved << std::endl; + /* clang-format off */ + oss << "DISP_E_EXCEPTION EXCEPINFO:" << excep.wCode << "\n" + " wCode: " << excep.wCode << "\n" + " wReserved: " << excep.wReserved << '\n'; + /* clang-format on */ if (excep.bstrSource) { oss << " bstrSource: " << (const char*)(_bstr_t)excep.bstrSource - << std::endl; + << '\n'; } if (excep.bstrDescription) { oss << " bstrDescription: " - << (const char*)(_bstr_t)excep.bstrDescription << std::endl; + << (const char*)(_bstr_t)excep.bstrDescription << '\n'; } if (excep.bstrHelpFile) { oss << " bstrHelpFile: " << (const char*)(_bstr_t)excep.bstrHelpFile - << std::endl; + << '\n'; } - oss << " dwHelpContext: " << excep.dwHelpContext << std::endl; - oss << " pvReserved: " << excep.pvReserved << std::endl; - oss << " pfnDeferredFillIn: " - << reinterpret_cast<void*>(excep.pfnDeferredFillIn) << std::endl; - oss << " scode: " << excep.scode << std::endl; + /* clang-format off */ + oss << " dwHelpContext: " << excep.dwHelpContext << "\n" + " pvReserved: " << excep.pvReserved << "\n" + " pfnDeferredFillIn: " + << reinterpret_cast<void*>(excep.pfnDeferredFillIn) << "\n" + " scode: " << excep.scode << '\n'; + /* clang-format on */ } std::string exstr(oss.str()); |