1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-25 07:44:38 +01:00

Make rct_windowclass strong type WindowClass

This already revealed some places where implicit conversions were done, including some where its use was nonsense (MouseInput.cpp).
The changes to the Intent class were necessary to keep things working, and this splits things up more neatly.
This commit is contained in:
Hielke Morsink
2022-08-21 18:38:25 +02:00
committed by GitHub
parent ebe38a91ce
commit 7f29e4e39c
145 changed files with 1331 additions and 1235 deletions

View File

@@ -13,9 +13,19 @@
#include <utility>
Intent::Intent(rct_windowclass windowclass)
Intent::Intent(WindowClass windowClass)
: _Class(windowClass)
{
}
Intent::Intent(WindowDetail windowDetail)
: _WindowDetail(windowDetail)
{
}
Intent::Intent(IntentAction intentAction)
: _Action(intentAction)
{
this->_Class = windowclass;
}
Intent* Intent::putExtra(uint32_t key, uint32_t value)
@@ -73,11 +83,21 @@ Intent* Intent::putExtra(uint32_t key, close_callback value)
return this;
}
rct_windowclass Intent::GetWindowClass() const
WindowClass Intent::GetWindowClass() const
{
return this->_Class;
}
WindowDetail Intent::GetWindowDetail() const
{
return this->_WindowDetail;
}
IntentAction Intent::GetAction() const
{
return this->_Action;
}
void* Intent::GetPointerExtra(uint32_t key) const
{
if (_Data.count(key) == 0)