mirror of https://github.com/OpenRCT2/OpenRCT2.git
Remove Exception::GetMsg()
We can undef any macro windows.h defines and interferes with our code base. In this case GetMessage
This commit is contained in:
parent
e4b53630ed
commit
91eb33255b
|
@ -130,7 +130,7 @@ exitcode_t CommandLine::HandleCommandConvert(CommandLineArgEnumerator * enumerat
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console::Error::WriteLine(ex.GetMsg());
|
||||
Console::Error::WriteLine(ex.GetMessage());
|
||||
return EXITCODE_FAIL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#if defined(DEBUG) && defined(__WINDOWS__)
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#undef GetMessage
|
||||
#endif
|
||||
|
||||
#include "Diagnostics.hpp"
|
||||
|
|
|
@ -37,7 +37,6 @@ public:
|
|||
|
||||
const char * what() const throw() override { return _message.c_str(); }
|
||||
const char * GetMessage() const { return _message.c_str(); }
|
||||
const char * GetMsg() const { return _message.c_str(); }
|
||||
|
||||
private:
|
||||
std::string _message;
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#ifdef __WINDOWS__
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#undef GetMessage
|
||||
#endif
|
||||
|
||||
#include "Console.hpp"
|
||||
|
|
|
@ -112,7 +112,7 @@ void NetworkUserManager::Load()
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console::Error::WriteLine("Failed to read %s as JSON. %s", path, ex.GetMsg());
|
||||
Console::Error::WriteLine("Failed to read %s as JSON. %s", path, ex.GetMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include <winsock2.h>
|
||||
#include <ws2tcpip.h>
|
||||
|
||||
#undef GetMessage
|
||||
#define LAST_SOCKET_ERROR() WSAGetLastError()
|
||||
#undef EWOULDBLOCK
|
||||
#define EWOULDBLOCK WSAEWOULDBLOCK
|
||||
|
@ -321,7 +322,7 @@ public:
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
req->Socket->_error = std::string(ex.GetMsg());
|
||||
req->Socket->_error = std::string(ex.GetMessage());
|
||||
}
|
||||
|
||||
SDL_UnlockMutex(req->Socket->_connectMutex);
|
||||
|
|
|
@ -291,7 +291,7 @@ bool Network::BeginServer(unsigned short port, const char* address)
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console::Error::WriteLine(ex.GetMsg());
|
||||
Console::Error::WriteLine(ex.GetMessage());
|
||||
Close();
|
||||
return false;
|
||||
}
|
||||
|
@ -754,7 +754,7 @@ void Network::LoadGroups()
|
|||
try {
|
||||
json = Json::ReadFromFile(path);
|
||||
} catch (const Exception& e) {
|
||||
log_error("Failed to read %s as JSON. Setting default groups. %s", path, e.GetMsg());
|
||||
log_error("Failed to read %s as JSON. Setting default groups. %s", path, e.GetMessage());
|
||||
// Hardcoded permission groups
|
||||
SetupDefaultGroups();
|
||||
return;
|
||||
|
|
|
@ -194,6 +194,7 @@ datetime64 platform_get_datetime_now_utc();
|
|||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#undef GetMessage
|
||||
|
||||
int windows_get_registry_install_info(rct2_install_info *installInfo, char *source, char *font, uint8 charset);
|
||||
HWND windows_get_window_handle();
|
||||
|
|
Loading…
Reference in New Issue