24 lines
401 B
C++
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;
|
|
}
|
|
|
|
}
|