⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 glink.h

📁 Blood 2全套源码
💻 H
字号:

// The 100th linked list class I've got in Stdlith :)
// This one is for REALLY simple doubly linked lists..
// You need a GLink for the list head, and this just defines
// really common routines to insert, remove, and tie off.

#ifndef __GLINK_H__
#define __GLINK_H__


	typedef struct GLink_t
	{
		struct GLink_t *m_pNext, *m_pPrev;
		void *m_pData;
	} GLink;

	inline void gn_TieOff(GLink *pLink)
	{
		pLink->m_pNext = pLink->m_pPrev = pLink;
	}

	inline void gn_Insert(GLink *pAfter, GLink *pLink)
	{
		pLink->m_pPrev = pAfter;
		pLink->m_pNext = pAfter->m_pNext;
		pLink->m_pPrev->m_pNext = pLink->m_pNext->m_pPrev = pLink;
	}

	inline void gn_Remove(GLink *pLink)
	{
		pLink->m_pPrev->m_pNext = pLink->m_pNext;
		pLink->m_pNext->m_pPrev = pLink->m_pPrev;
	}


#endif  

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -