| 738 | } |
| 739 | |
| 740 | bool AFCEntity::AddCustomUInt32(const std::string& name, const uint32_t value) |
| 741 | { |
| 742 | ARK_ASSERT_RET_VAL(custom_data_list_.find(name) == custom_data_list_.end(), false); |
| 743 | |
| 744 | AFIData* pData = ARK_NEW AFCData; |
| 745 | ARK_ASSERT_RET_VAL(pData != nullptr, false); |
| 746 | |
| 747 | pData->SetUInt(value); |
| 748 | if (!custom_data_list_.insert(name, pData).second) |
| 749 | { |
| 750 | ARK_DELETE(pData); |
| 751 | return false; |
| 752 | } |
| 753 | |
| 754 | return true; |
| 755 | } |
| 756 | |
| 757 | bool AFCEntity::AddCustomInt64(const std::string& name, const int64_t value) |
| 758 | { |