File diff r15933:39e6324db57a → r15934:789c54d0000d
src/misc/hashtable.hpp
Show inline comments
 
@@ -3,24 +3,26 @@
 
/*
 
 * This file is part of OpenTTD.
 
 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
 
 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file hashtable.hpp Hash table support. */
 

	
 
#ifndef  HASHTABLE_HPP
 
#define  HASHTABLE_HPP
 

	
 
#include "../core/math_func.hpp"
 

	
 
template <class Titem_>
 
struct CHashTableSlotT
 
{
 
	typedef typename Titem_::Key Key;          // make Titem_::Key a property of HashTable
 

	
 
	Titem_ *m_pFirst;
 

	
 
	FORCEINLINE CHashTableSlotT() : m_pFirst(NULL) {}
 

	
 
	/** hash table slot helper - clears the slot by simple forgetting its items */
 
	FORCEINLINE void Clear() {m_pFirst = NULL;}