mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-02-26 19:54:14 +01:00
GCC compatibility
--HG-- extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/trunk%40108
This commit is contained in:
parent
2917c2c751
commit
4b048ff0b2
@ -11,6 +11,8 @@
|
||||
#ifndef _INCLUDE_SMM_LIST_H
|
||||
#define _INCLUDE_SMM_LIST_H
|
||||
|
||||
#include <malloc.h>
|
||||
|
||||
namespace SourceHook
|
||||
{
|
||||
//This class is from CSDM for AMX Mod X
|
||||
@ -157,14 +159,10 @@ public:
|
||||
{
|
||||
return &(m_This->obj);
|
||||
}
|
||||
bool operator != (iterator &where)
|
||||
bool operator != (const iterator &where) const
|
||||
{
|
||||
return (m_This != where.m_This);
|
||||
}
|
||||
bool operator ==(iterator &where)
|
||||
{
|
||||
return (m_This == where.m_This);
|
||||
}
|
||||
bool operator ==(const iterator &where) const
|
||||
{
|
||||
return (m_This == where.m_This);
|
||||
|
@ -71,7 +71,7 @@ namespace SourceHook
|
||||
m_Buckets[place]->push_back(pNode);
|
||||
m_percentUsed += (1.0f / (float)m_numBuckets);
|
||||
} else {
|
||||
List<THashNode *>::iterator iter;
|
||||
typename List<THashNode *>::iterator iter;
|
||||
for (iter=m_Buckets[place]->begin(); iter!=m_Buckets[place]->end(); iter++)
|
||||
{
|
||||
if (Compare((*iter)->key, key) == 0)
|
||||
@ -97,7 +97,7 @@ namespace SourceHook
|
||||
} else {
|
||||
size_t oldSize = m_numBuckets;
|
||||
m_numBuckets *= 2;
|
||||
List<THashNode *>::iterator iter;
|
||||
typename List<THashNode *>::iterator iter;
|
||||
size_t place;
|
||||
THashNode *pHashNode;
|
||||
NodePtr *temp = new NodePtr[m_numBuckets];
|
||||
|
@ -14,18 +14,19 @@
|
||||
* @brief Contains the implementation of the SourceHook API
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include "sourcehook_impl.h"
|
||||
#include "sh_tinyhash.h"
|
||||
|
||||
namespace SourceHook
|
||||
{
|
||||
template<>
|
||||
SourceHook::HashFunction<int>(const int & k)
|
||||
int SourceHook::HashFunction<int>(const int & k)
|
||||
{
|
||||
return k;
|
||||
}
|
||||
template<>
|
||||
SourceHook::Compare<int>(const int & k1, const int & k2)
|
||||
int SourceHook::Compare<int>(const int & k1, const int & k2)
|
||||
{
|
||||
if (k1 == k2)
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user