From a39f0e0a71a24498f645bfe9fcc9e1525ff3b830 Mon Sep 17 00:00:00 2001 From: Ingo Ruhnke Date: Tue, 3 Mar 2009 11:08:43 +0000 Subject: [PATCH] Fixed compiler warnings in squirrel (minor stuff, patch is submitted to upstream) SVN-Revision: 5843 --- src/squirrel/include/sqstdio.h | 1 + src/squirrel/sqstdlib/sqstdstream.cpp | 2 +- src/squirrel/sqstdlib/sqstdstream.h | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/squirrel/include/sqstdio.h b/src/squirrel/include/sqstdio.h index 2cb744bcf..5eaec31c6 100644 --- a/src/squirrel/include/sqstdio.h +++ b/src/squirrel/include/sqstdio.h @@ -7,6 +7,7 @@ #define SQSTD_STREAM_TYPE_TAG 0x80000000 struct SQStream { + virtual ~SQStream() {} virtual SQInteger Read(void *buffer, SQInteger size) = 0; virtual SQInteger Write(void *buffer, SQInteger size) = 0; virtual SQInteger Flush() = 0; diff --git a/src/squirrel/sqstdlib/sqstdstream.cpp b/src/squirrel/sqstdlib/sqstdstream.cpp index 4cd63da51..f373f5bed 100644 --- a/src/squirrel/sqstdlib/sqstdstream.cpp +++ b/src/squirrel/sqstdlib/sqstdstream.cpp @@ -277,7 +277,7 @@ void init_streamclass(HSQUIRRELVM v) sq_pop(v,1); } -SQRESULT declare_stream(HSQUIRRELVM v,SQChar* name,SQUserPointer typetag,SQChar* reg_name,SQRegFunction *methods,SQRegFunction *globals) +SQRESULT declare_stream(HSQUIRRELVM v,const SQChar* name,SQUserPointer typetag,const SQChar* reg_name,SQRegFunction *methods,SQRegFunction *globals) { if(sq_gettype(v,-1) != OT_TABLE) return sq_throwerror(v,_SC("table expected")); diff --git a/src/squirrel/sqstdlib/sqstdstream.h b/src/squirrel/sqstdlib/sqstdstream.h index 6b5bb9d8a..4dcc00054 100644 --- a/src/squirrel/sqstdlib/sqstdstream.h +++ b/src/squirrel/sqstdlib/sqstdstream.h @@ -14,5 +14,5 @@ SQInteger _stream_eos(HSQUIRRELVM v); SQInteger _stream_flush(HSQUIRRELVM v); #define _DECL_STREAM_FUNC(name,nparams,typecheck) {_SC(#name),_stream_##name,nparams,typecheck} -SQRESULT declare_stream(HSQUIRRELVM v,SQChar* name,SQUserPointer typetag,SQChar* reg_name,SQRegFunction *methods,SQRegFunction *globals); +SQRESULT declare_stream(HSQUIRRELVM v,const SQChar* name,SQUserPointer typetag,const SQChar* reg_name,SQRegFunction *methods,SQRegFunction *globals); #endif /*_SQSTD_STREAM_H_*/ -- 2.11.0