//
// cocos2d::CCBMFontConfiguration::~CCBMFontConfiguration from 0x1800472b0 to 0x1800473da (298 bytes)
//
// 6 xrefs:
// > sub_180047550 @ 0x1800475ae
// > sub_180047550 @ 0x18004756c
// > ??> @ 0x1801374d4
// > ??> @ 0x180137508
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b1818
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall cocos2d::CCBMFontConfiguration::~CCBMFontConfiguration(cocos2d::CCBMFontConfiguration *this)
{
std::string *p_m_sAtlasName; // rax
std::set *m_pCharacterSet; // rsi
std::_Tree_node::_Nodeptr Parent; // rbx
std::_Tree_node::_Nodeptr v5; // rcx
std::size_t m_capacity; // rdx
char *m_bigStorage; // rcx
this->__vftable = (cocos2d::CCBMFontConfiguration_vtbl *)&cocos2d::CCBMFontConfiguration::`vftable';
cocos2d::CCBMFontConfiguration::purgeFontDefDictionary(this);
cocos2d::CCBMFontConfiguration::purgeKerningDictionary(this);
this->m_sAtlasName.m_data.m_size = 0;
p_m_sAtlasName = &this->m_sAtlasName;
if ( this->m_sAtlasName.m_data.m_capacity > 0xF )
p_m_sAtlasName = (std::string *)this->m_sAtlasName.m_data.m_bigStorage;
p_m_sAtlasName->m_data.m_smallStorage._Elems[0] = 0;
m_pCharacterSet = this->m_pCharacterSet;
if ( m_pCharacterSet )
{
Parent = m_pCharacterSet->_Mypair._Myval2._Myval2._Myhead->_Parent;
while ( !Parent->_Isnil )
{
sub_180046C20((__int64)m_pCharacterSet, (__int64)m_pCharacterSet, (__int64)Parent->_Right);
v5 = Parent;
Parent = Parent->_Left;
j_j_free_0(v5);
}
j_j_free_0(m_pCharacterSet->_Mypair._Myval2._Myval2._Myhead);
j_j_free_0(m_pCharacterSet);
this->m_pCharacterSet = nullptr;
}
m_capacity = this->m_sAtlasName.m_data.m_capacity;
if ( m_capacity > 0xF )
{
m_bigStorage = this->m_sAtlasName.m_data.m_bigStorage;
if ( m_capacity + 1 >= 0x1000 )
{
if ( (unsigned __int64)&m_bigStorage[-*((_QWORD *)m_bigStorage - 1) - 8] > 0x1F )
invalid_parameter_noinfo_noreturn();
m_bigStorage = *((char **)m_bigStorage - 1);
}
j_j_free_0(m_bigStorage);
}
this->m_sAtlasName.m_data.m_size = 0;
this->m_sAtlasName.m_data.m_capacity = 15;
this->m_sAtlasName.m_data.m_smallStorage._Elems[0] = 0;
cocos2d::CCObject::~CCObject(this);
}