コード例 #1
0
ファイル: list.cpp プロジェクト: ibrahimmusba/ufoai
/**
 * @sa LIST_Add
 * @sa LIST_RemoveEntry
 */
bool LIST_Remove (linkedList_t **list, const void *data)
{
	linkedList_t *l = LIST_GetPointer(*list, data);
	if (l != nullptr)
		return LIST_RemoveEntry(list, l);
	return false;
}
コード例 #2
0
ファイル: ui_node_special.cpp プロジェクト: rxadmin/ufoai
/**
 * @brief Callback every time the parent window is opened (pushed into the active window stack)
 */
static void UI_CvarListenerNodeBind (uiNode_t* node)
{
    cvarChangeListener_t* l;
    l = Cvar_RegisterChangeListener(node->name, UI_CvarListenerNodeCallback);
    if (l == nullptr) {
        Com_Printf("Node %s is not binded: cvar %s not found\n", UI_GetPath(node), node->name);
        return;
    }

    if (LIST_GetPointer(static_cast<linkedList_t*>(l->data), node) == nullptr) {
        LIST_AddPointer(reinterpret_cast<linkedList_t**>(&l->data), node);
    }
}