Fixed GCC build.

This commit is contained in:
Lasse Öörni 2011-05-14 21:51:21 +00:00
parent 343e9052b3
commit 4ba161e749
5 changed files with 18 additions and 18 deletions

View File

@ -26,7 +26,7 @@
#include "RefCounted.h"
/// Shared array pointer template class. Uses non-intrusive reference counting
template <typename T> class SharedArrayPtr
template <class T> class SharedArrayPtr
{
public:
/// Construct a null shared array pointer
@ -115,7 +115,7 @@ public:
}
/// Perform a static cast from a shared array pointer of another type
template <typename U> void StaticCast(const SharedArrayPtr<U>& rhs)
template <class U> void StaticCast(const SharedArrayPtr<U>& rhs)
{
Release();
@ -126,7 +126,7 @@ public:
}
/// Perform a dynatic cast from a shared array pointer of another type
template <typename U> void DynamicCast(const SharedArrayPtr<U>& rhs)
template <class U> void DynamicCast(const SharedArrayPtr<U>& rhs)
{
Release();
@ -156,7 +156,7 @@ public:
private:
/// Prevent direct assignment from a shared array pointer of different type
template <typename U> SharedArrayPtr<T>& operator = (const SharedArrayPtr<U>& rhs);
template <class U> SharedArrayPtr<T>& operator = (const SharedArrayPtr<U>& rhs);
/// Release the array reference and delete it and the RefCount structure as applicable
void Release()
@ -188,7 +188,7 @@ private:
};
/// Perform a static cast from one shared array pointer type to another
template <typename T, typename U> SharedArrayPtr<T> StaticCast(const SharedArrayPtr<U>& ptr)
template <class T, class U> SharedArrayPtr<T> StaticCast(const SharedArrayPtr<U>& ptr)
{
SharedArrayPtr<T> ret;
ret.StaticCast(ptr);
@ -196,7 +196,7 @@ template <typename T, typename U> SharedArrayPtr<T> StaticCast(const SharedArray
}
/// Perform a dynamic cast from one shared array pointer type to another
template <typename T, typename U> SharedArrayPtr<T> DynamicCast(const SharedArrayPtr<U>& ptr)
template <class T, class U> SharedArrayPtr<T> DynamicCast(const SharedArrayPtr<U>& ptr)
{
SharedArrayPtr<T> ret;
ret.DynamicCast(ptr);
@ -204,7 +204,7 @@ template <typename T, typename U> SharedArrayPtr<T> DynamicCast(const SharedArra
}
/// Weak array pointer template class. Uses non-intrusive reference counting
template <typename T> class WeakArrayPtr
template <class T> class WeakArrayPtr
{
public:
/// Construct a null weak array pointer
@ -322,7 +322,7 @@ public:
}
/// Perform a static cast from a weak array pointer of another type
template <typename U> void StaticCast(const WeakArrayPtr<U>& rhs)
template <class U> void StaticCast(const WeakArrayPtr<U>& rhs)
{
Release();
@ -333,7 +333,7 @@ public:
}
/// Perform a dynamic cast from a weak array pointer of another type
template <typename U> void DynamicCast(const WeakArrayPtr<U>& rhs)
template <class U> void DynamicCast(const WeakArrayPtr<U>& rhs)
{
Release();
@ -363,7 +363,7 @@ public:
private:
/// Prevent direct assignment from a weak array pointer of different type
template <typename U> WeakArrayPtr<T>& operator = (const WeakArrayPtr<U>& rhs);
template <class U> WeakArrayPtr<T>& operator = (const WeakArrayPtr<U>& rhs);
/// Release the weak reference. Delete the Refcount structure if the array has expired and this was the last weak reference
void Release()
@ -388,7 +388,7 @@ private:
};
/// Perform a static cast from one weak array pointer type to another
template <typename T, typename U> WeakArrayPtr<T> StaticCast(const WeakArrayPtr<U>& ptr)
template <class T, class U> WeakArrayPtr<T> StaticCast(const WeakArrayPtr<U>& ptr)
{
WeakArrayPtr<T> ret;
ret.StaticCast(ptr);
@ -396,7 +396,7 @@ template <typename T, typename U> WeakArrayPtr<T> StaticCast(const WeakArrayPtr<
}
/// Perform a dynamic cast from one weak pointer type to another
template <typename T, typename U> WeakArrayPtr<T> DynamicCast(const WeakArrayPtr<U>& ptr)
template <class T, class U> WeakArrayPtr<T> DynamicCast(const WeakArrayPtr<U>& ptr)
{
WeakArrayPtr<T> ret;
ret.DynamicCast(ptr);

View File

@ -839,7 +839,7 @@ public:
}
/// Return the value, template version
template <typename T> T Get() const;
template <class T> T Get() const;
/// Return type
VariantType GetType() const { return type_; }
/// Return type name

View File

@ -23,7 +23,7 @@
#pragma once
#include "Event.h"
#include "Object.h"
/// (Server) Client has sent login
EVENT(E_CLIENTLOGIN, ClientLogin)

View File

@ -62,17 +62,17 @@ Server::~Server()
void Server::SetNetFps(int fps)
{
netFps_ = max(fps, 1);
netFps_ = Max(fps, 1);
}
void Server::SetMaxSceneRevisions(int revisions)
{
maxSceneRevisions_ = max(revisions, 3);
maxSceneRevisions_ = Max(revisions, 3);
}
void Server::SetStayRelevantTime(int time)
{
stayRelevantTime_ = max(time, 1);
stayRelevantTime_ = Max(time, 1);
}
void Server::AddScene(Scene* scene)

View File

@ -79,7 +79,7 @@ protected:
/// Template implementation of the attribute accessor invoke helper class (stores function pointers of specific class)
template <class T, typename U> class AttributeAccessorImpl : public AttributeAccessor
template <class T, class U> class AttributeAccessorImpl : public AttributeAccessor
{
public:
typedef U (T::*GetFunctionPtr)() const;