doc: add documentation

- add documentation for CKGlobals, VxMath (partly)
- Fix build issue in CKDefines, CKGlobals, VxMath.
- Bring libcmo exception in CKGlobals and VxMath for some illegal input.
This commit is contained in:
2024-08-21 17:57:35 +08:00
parent f7708c28e0
commit a7c1028926
7 changed files with 261 additions and 144 deletions

View File

@ -20,7 +20,6 @@ namespace LibCmo::CK2::MgrImpls {
// get description first
const CKClassDesc* desc = CKGetClassDesc(cls);
if (desc == nullptr) return nullptr;
// allocate a CK_ID first
CKDWORD decided_off;
@ -60,12 +59,7 @@ namespace LibCmo::CK2::MgrImpls {
void CKObjectManager::InternalDestroy(ObjImpls::CKObject* obj) {
// find desc by classid
// if really we can not find it, we only can delete it directly.
const CKClassDesc* desc = CKGetClassDesc(obj->GetClassID());
if (desc == nullptr) {
delete obj;
return;
}
// free it
desc->ReleaseFct(m_Context, obj);