* 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;
inline CHashTableSlotT() : m_pFirst(NULL) {}
/** hash table slot helper - clears the slot by simple forgetting its items */
inline void Clear()
{
m_pFirst = NULL;
}
/** hash table slot helper - linear search for item with given key through the given blob - const version */