diff options
Diffstat (limited to 'src/win/graph')
-rw-r--r-- | src/win/graph/direct/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/win/graph/direct/exception.cpp | 29 |
2 files changed, 0 insertions, 30 deletions
diff --git a/src/win/graph/direct/CMakeLists.txt b/src/win/graph/direct/CMakeLists.txt index 7cbbb080..7228802c 100644 --- a/src/win/graph/direct/CMakeLists.txt +++ b/src/win/graph/direct/CMakeLists.txt @@ -2,7 +2,6 @@ set(CRU_WIN_GRAPH_DIRECT_INCLUDE_DIR ${CRU_INCLUDE_DIR}/cru/win/graph/direct) add_library(cru_win_graph_direct STATIC brush.cpp - exception.cpp font.cpp geometry.cpp graph_factory.cpp diff --git a/src/win/graph/direct/exception.cpp b/src/win/graph/direct/exception.cpp deleted file mode 100644 index 23c267c1..00000000 --- a/src/win/graph/direct/exception.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include "cru/win/graph/direct/exception.hpp" - -#include "cru/common/format.hpp" - -namespace cru::platform::graph::win::direct { -using util::Format; - -inline std::string HResultMakeMessage(HRESULT h_result, - const std::string_view* message) { - char buffer[10]; - sprintf_s(buffer, "%#08x", h_result); - - if (message) - return Format( - "An HResultError is thrown. HRESULT: {}.\nAdditional message: {}\n", - buffer, *message); - else - return Format("An HResultError is thrown. HRESULT: {}.\n", buffer); -} - -HResultError::HResultError(HRESULT h_result) - : PlatformException(HResultMakeMessage(h_result, nullptr)), - h_result_(h_result) {} - -HResultError::HResultError(HRESULT h_result, - const std::string_view& additional_message) - : PlatformException(HResultMakeMessage(h_result, &additional_message)), - h_result_(h_result) {} -} // namespace cru::platform::graph::win::direct |