aozhiwei f95d61c75f 1
2022-12-25 15:37:12 +08:00

24 lines
401 B
C++

#include "precompile.h"
#include "mt/SafeArea.h"
IMPL_TABLE(mt::SafeArea)
std::map<int, const mt::SafeArea*> mt::SafeArea::type_hash_;
namespace mt
{
void SafeArea::Init1()
{
type_hash_[type()] = this;
}
const SafeArea* SafeArea::GetByType(int type)
{
auto itr = type_hash_.find(type);
return itr != type_hash_.end() ? itr->second : nullptr;
}
}