| 755 | } |
| 756 | |
| 757 | bool AFCEntity::AddCustomInt64(const std::string& name, const int64_t value) |
| 758 | { |
| 759 | ARK_ASSERT_RET_VAL(custom_data_list_.find(name) == custom_data_list_.end(), false); |
| 760 | |
| 761 | AFIData* pData = ARK_NEW AFCData; |
| 762 | ARK_ASSERT_RET_VAL(pData != nullptr, false); |
| 763 | |
| 764 | pData->SetInt64(value); |
| 765 | if (!custom_data_list_.insert(name, pData).second) |
| 766 | { |
| 767 | ARK_DELETE(pData); |
| 768 | return false; |
| 769 | } |
| 770 | |
| 771 | return true; |
| 772 | } |
| 773 | |
| 774 | bool AFCEntity::AddCustomFloat(const std::string& name, const float value) |
| 775 | { |