mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-08 13:23:51 +00:00
Work around windows.h clobbering GetMessage.
windows.h uses a macro to forward GetMessage to GetMessageA or GetMessageW, so to work around that we do the same on windows.
This commit is contained in:
parent
1ef967a426
commit
552a8ab160
@ -36,6 +36,14 @@ class Error
|
||||
public:
|
||||
const std::string &GetMessage() const { return this->Message; }
|
||||
|
||||
//GetMessage is a macro defined by <windows.h> to redirrect to
|
||||
//GetMessageA or W depending on if you are using ansi or unicode.
|
||||
//To get around this we make our own A/W variants on windows.
|
||||
#ifdef _WIN32
|
||||
const std::string &GetMessageA() const { return this->Message; }
|
||||
const std::string &GetMessageW() const { return this->Message; }
|
||||
#endif
|
||||
|
||||
protected:
|
||||
Error() { }
|
||||
Error(const std::string message) : Message(message) { }
|
||||
|
Loading…
Reference in New Issue
Block a user