about summary refs log tree commit diff
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2010-06-05 13:38:08 +0200
committerMagnus Auvinen <magnus.auvinen@gmail.com>2010-06-06 17:16:52 +0200
commita41d930a85f31064965d89115d851518d568f175 (patch)
treea610acd394464ec39139c27df2bd7e194875a34f
parent7d03e70d1e6b0cd0b55c741d90b33fd4e2e51cb5 (diff)
downloadzcatch-a41d930a85f31064965d89115d851518d568f175.tar.gz
zcatch-a41d930a85f31064965d89115d851518d568f175.zip
fixed some compiler warnings. Closes #76
-rw-r--r--src/engine/external/pnglite/pnglite.h2
-rw-r--r--src/game/client/components/console.cpp14
-rw-r--r--src/game/client/components/console.h3
-rw-r--r--src/game/server/entities/character.h2
4 files changed, 15 insertions, 6 deletions
diff --git a/src/engine/external/pnglite/pnglite.h b/src/engine/external/pnglite/pnglite.h
index 72ff1c52..eae3d4ce 100644
--- a/src/engine/external/pnglite/pnglite.h
+++ b/src/engine/external/pnglite/pnglite.h
@@ -73,7 +73,7 @@ enum
 typedef unsigned (*png_write_callback_t)(void* input, unsigned long size, unsigned long numel, void* user_pointer);

 typedef unsigned (*png_read_callback_t)(void* output, unsigned long size, unsigned long numel, void* user_pointer);

 typedef void (*png_free_t)(void* p);

-typedef void * (*png_alloc_t)(unsigned long s);

+typedef void * (*png_alloc_t)(size_t s);

 

 typedef struct

 {

diff --git a/src/game/client/components/console.cpp b/src/game/client/components/console.cpp
index 742b6b2d..b323ab48 100644
--- a/src/game/client/components/console.cpp
+++ b/src/game/client/components/console.cpp
@@ -34,9 +34,8 @@ enum
 	CONSOLE_CLOSING,
 };
 
-CGameConsole::CInstance::CInstance(CGameConsole *pGameConsole, int Type)
+CGameConsole::CInstance::CInstance(int Type)
 {
-	m_pGameConsole = pGameConsole;
 	// init ringbuffers
 	//history = ringbuf_init(history_data, sizeof(history_data), RINGBUF_FLAG_RECYCLE);
 	//backlog = ringbuf_init(backlog_data, sizeof(backlog_data), RINGBUF_FLAG_RECYCLE);
@@ -56,6 +55,11 @@ CGameConsole::CInstance::CInstance(CGameConsole *pGameConsole, int Type)
 	m_pCommand = 0x0;
 }
 
+void CGameConsole::CInstance::Init(CGameConsole *pGameConsole)
+{
+	m_pGameConsole = pGameConsole;
+};
+
 void CGameConsole::CInstance::ExecuteLine(const char *pLine)
 {
 	if(m_Type == 0)
@@ -198,7 +202,7 @@ void CGameConsole::CInstance::PrintLine(const char *pLine)
 }
 
 CGameConsole::CGameConsole()
-: m_LocalConsole(this, 0), m_RemoteConsole(this, 1)
+: m_LocalConsole(0), m_RemoteConsole(1)
 {
 	m_ConsoleType = 0;
 	m_ConsoleState = CONSOLE_CLOSED;
@@ -573,6 +577,10 @@ void CGameConsole::PrintLine(int Type, const char *pLine)
 
 void CGameConsole::OnConsoleInit()
 {
+	// init console instances
+	m_LocalConsole.Init(this);
+	m_RemoteConsole.Init(this);
+
 	m_pConsole = Kernel()->RequestInterface<IConsole>();
 	
 	//
diff --git a/src/game/client/components/console.h b/src/game/client/components/console.h
index b88c6349..d146307f 100644
--- a/src/game/client/components/console.h
+++ b/src/game/client/components/console.h
@@ -27,7 +27,8 @@ class CGameConsole : public CComponent
 		
 		IConsole::CCommandInfo *m_pCommand;
 
-		CInstance(CGameConsole *pGameConsole, int t);
+		CInstance(int t);
+		void Init(CGameConsole *pGameConsole);
 
 		void ExecuteLine(const char *pLine);
 		
diff --git a/src/game/server/entities/character.h b/src/game/server/entities/character.h
index a1add982..bea0c002 100644
--- a/src/game/server/entities/character.h
+++ b/src/game/server/entities/character.h
@@ -57,7 +57,7 @@ public:
 	
 	void SetEmote(int Emote, int Tick);
 	
-	const bool IsAlive() { return m_Alive; }
+	bool IsAlive() const { return m_Alive; }
 	class CPlayer *GetPlayer() { return m_pPlayer; }
 	
 private: