From 0d21d65fc619fd5b704f9f0eca3ca7c1cb38a223 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Sat, 9 Mar 2019 00:16:38 +0100 Subject: [PATCH] Move CalcException from header to its only consumer Removes the now-empty header as well --- src/CalcManager/CEngine/History.cpp | 16 +++++++++++++++- src/CalcManager/CalcException.h | 17 ----------------- src/CalcManager/CalcManager.vcxproj.filters | 3 +-- 3 files changed, 16 insertions(+), 20 deletions(-) delete mode 100644 src/CalcManager/CalcException.h diff --git a/src/CalcManager/CEngine/History.cpp b/src/CalcManager/CEngine/History.cpp index 283b1dce..7f4fd772 100644 --- a/src/CalcManager/CEngine/History.cpp +++ b/src/CalcManager/CEngine/History.cpp @@ -6,13 +6,27 @@ #include "Command.h" #include "CalculatorVector.h" #include "ExpressionCommand.h" -#include "CalcException.h" constexpr int ASCII_0 = 48; using namespace std; using namespace CalcEngine; +class CalcException : public std::exception +{ +public: + CalcException(HRESULT hr) + { + m_hr = hr; + } + HRESULT GetException() + { + return m_hr; + } +private: + HRESULT m_hr; +}; + namespace { void IFT(HRESULT hr) { diff --git a/src/CalcManager/CalcException.h b/src/CalcManager/CalcException.h deleted file mode 100644 index 5b7237d9..00000000 --- a/src/CalcManager/CalcException.h +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -class CalcException : public std::exception -{ -public: - CalcException(HRESULT hr) - { - m_hr = hr; - } - HRESULT GetException() - { - return m_hr; - } -private: - HRESULT m_hr; -}; diff --git a/src/CalcManager/CalcManager.vcxproj.filters b/src/CalcManager/CalcManager.vcxproj.filters index 9be2a455..2ca11666 100644 --- a/src/CalcManager/CalcManager.vcxproj.filters +++ b/src/CalcManager/CalcManager.vcxproj.filters @@ -119,7 +119,6 @@ RatPack - Header Files @@ -162,4 +161,4 @@ Header Files - \ No newline at end of file +