From 5d91d1e5594e37ca5c282e602407eaeb34c6d986 Mon Sep 17 00:00:00 2001 From: crupest Date: Sat, 22 Sep 2018 22:57:44 +0800 Subject: Done 3 things: 1. Add some helper functions for create controls with layout params. 2. Fix a bug in measure of linear layout. 3. Fix a bug in exception. --- CruUI/exception.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'CruUI/exception.cpp') diff --git a/CruUI/exception.cpp b/CruUI/exception.cpp index 38075247..a1d59ceb 100644 --- a/CruUI/exception.cpp +++ b/CruUI/exception.cpp @@ -7,9 +7,9 @@ namespace cru inline std::string HResultMakeMessage(HRESULT h_result, std::optional message) { if (message.has_value()) - return fmt::format("An HResultError is thrown. HRESULT: {:#08x}.\n", h_result); - else return fmt::format("An HResultError is thrown. HRESULT: {:#08x}.\nAdditional message: {}\n", h_result, message.value()); + else + return fmt::format("An HResultError is thrown. HRESULT: {:#08x}.\n", h_result); } HResultError::HResultError(HRESULT h_result, std::optional additional_message) @@ -21,9 +21,9 @@ namespace cru inline std::string Win32MakeMessage(DWORD error_code, std::optional message) { if (message.has_value()) - return fmt::format("Last error code: {:#04x}.\n", error_code); - else return fmt::format("Last error code: {:#04x}.\nAdditional message: {}\n", error_code, message.value()); + else + return fmt::format("Last error code: {:#04x}.\n", error_code); } Win32Error::Win32Error(DWORD error_code, std::optional additional_message) -- cgit v1.2.3