MCPcopy Create free account
hub / github.com/dhewm/dhewm3 / GetDeclFromTreeItem

Method GetDeclFromTreeItem

neo/tools/decl/DialogDeclBrowser.cpp:252–272  ·  view source on GitHub ↗

================ DialogDeclBrowser::GetDeclFromTreeItem ================ */

Source from the content-addressed store, hash-verified

250================
251*/
252const idDecl *DialogDeclBrowser::GetDeclFromTreeItem( HTREEITEM item ) const {
253 int id, index;
254 declType_t type;
255 const idDecl *decl;
256
257 if ( declTree.GetChildItem( item ) ) {
258 return NULL;
259 }
260
261 id = declTree.GetItemData( item );
262 type = GetTypeFromId( id );
263 index = GetIndexFromId( id );
264
265 if ( type < 0 || type >= declManager->GetNumDeclTypes() ) {
266 return NULL;
267 }
268
269 decl = declManager->DeclByIndex( type, index, false );
270
271 return decl;
272}
273
274/*
275================

Callers

nothing calls this directly

Calls 2

GetNumDeclTypesMethod · 0.80
DeclByIndexMethod · 0.80

Tested by

no test coverage detected