mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-19 04:53:12 +01:00
Implement TIdentifier specialization for Intent
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "../common.h"
|
||||
#include "../core/Identifier.hpp"
|
||||
#include "../interface/Window.h"
|
||||
|
||||
#include <map>
|
||||
@@ -54,6 +55,12 @@ public:
|
||||
Intent* putExtra(uint32_t key, int32_t value);
|
||||
Intent* putExtra(uint32_t key, std::string value);
|
||||
Intent* putExtra(uint32_t key, close_callback value);
|
||||
|
||||
template<typename T, T TNull, typename TTag> Intent* putExtra(uint32_t key, const TIdentifier<T, TNull, TTag>& value)
|
||||
{
|
||||
const auto val = value.ToUnderlying();
|
||||
return putExtra(key, static_cast<uint32_t>(val));
|
||||
}
|
||||
};
|
||||
|
||||
enum
|
||||
|
||||
Reference in New Issue
Block a user