From 4045edf1aab245884ab46a3460d7245341af4e82 Mon Sep 17 00:00:00 2001 From: Robert Bryce Date: Tue, 30 May 2023 16:08:43 -0500 Subject: [PATCH] Pulling some of the implementation into the source file so that it can't be inlined into more than one binary target, to help with type resolution in catch blocks. Likely shouldn't be needed but it helped resolve an issue with the latest release of MSVC. --- cpp/ICWFGM_CommonBase.cpp | 14 ++++++++++++++ include/ISerializeProto.h | 12 +++--------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/cpp/ICWFGM_CommonBase.cpp b/cpp/ICWFGM_CommonBase.cpp index c7fff14..dffa5d5 100644 --- a/cpp/ICWFGM_CommonBase.cpp +++ b/cpp/ICWFGM_CommonBase.cpp @@ -17,6 +17,7 @@ */ #include "ICWFGM_CommonBase.h" +#include "ISerializeProto.h" #include "WTime.h" @@ -307,3 +308,16 @@ HRESULT ICWFGM_CommonBase::put_UserData(const PolymorphicUserData &newVal) { m_userData = newVal; return S_OK; } + + +ISerializeProto::DeserializeError::DeserializeError(const std::string& message) : + logic_error(message) +{ +} + + +ISerializeProto::DeserializeError::DeserializeError(const std::string& message, std::uint32_t hr_) : + logic_error(message) +{ + hr = hr_; +} diff --git a/include/ISerializeProto.h b/include/ISerializeProto.h index a737d3f..99022cc 100644 --- a/include/ISerializeProto.h +++ b/include/ISerializeProto.h @@ -75,19 +75,13 @@ class ISerializationData { class ISerializeProto { public: - class DeserializeError : public std::logic_error { + class FUELCOM_API DeserializeError : public std::logic_error { protected: std::string msg_; public: - explicit DeserializeError(const std::string& message) : - logic_error(message) - {} - explicit DeserializeError(const std::string& message, std::uint32_t hr_) : - logic_error(message) - { - hr = hr_; - } + explicit DeserializeError(const std::string& message); + explicit DeserializeError(const std::string& message, std::uint32_t hr_); std::uint32_t hr = 0; };