mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-12-01 01:11:46 +00:00
25 lines
387 B
C++
25 lines
387 B
C++
#pragma once
|
|
|
|
template <typename T, typename U>
|
|
class InitConstMap
|
|
{
|
|
private:
|
|
std::map<T, U> m_map;
|
|
public:
|
|
InitConstMap(const T& key, const U& val)
|
|
{
|
|
m_map[key] = val;
|
|
}
|
|
|
|
InitConstMap<T, U>& operator()(const T& key, const U& val)
|
|
{
|
|
m_map[key] = val;
|
|
return *this;
|
|
}
|
|
|
|
operator std::map<T, U>()
|
|
{
|
|
return m_map;
|
|
}
|
|
};
|