From 7bef7160ca41bbcecc94372b12170bebacd2011b Mon Sep 17 00:00:00 2001 From: Ykkrosh Date: Sun, 11 Jul 2004 12:49:44 +0000 Subject: [PATCH] gcc warning fixes This was SVN commit r702. --- source/graphics/ParticleEmitter.cpp | 1 - source/lib/adts.h | 2 +- source/ps/NPFont.h | 2 +- source/simulation/scripting/JSInterface_Entity.cpp | 3 ++- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/graphics/ParticleEmitter.cpp b/source/graphics/ParticleEmitter.cpp index 17c0c13af9..21d4530c33 100755 --- a/source/graphics/ParticleEmitter.cpp +++ b/source/graphics/ParticleEmitter.cpp @@ -36,7 +36,6 @@ using namespace std; CParticleEmitter::CParticleEmitter() : - m_particles(NULL), m_origin(0.0f, 0.0f, 0.0f), m_originSpread(0.0f, 0.0f, 0.0f), m_velocity(0.0f, 0.0f, 0.0f), diff --git a/source/lib/adts.h b/source/lib/adts.h index c1aaeecaef..da83aa380f 100755 --- a/source/lib/adts.h +++ b/source/lib/adts.h @@ -229,7 +229,7 @@ private: // mark it as the most recently used line. Line* find_line(u64 id) { - Map::const_iterator i = idx.find(id); + typename Map::const_iterator i = idx.find(id); // not found if(i == idx.end()) return 0; diff --git a/source/ps/NPFont.h b/source/ps/NPFont.h index 416b9857a7..7e9a07e6b6 100755 --- a/source/ps/NPFont.h +++ b/source/ps/NPFont.h @@ -43,7 +43,7 @@ public: // accessor for character data const CharData& chardata(char c) const { - assert(c>=0 && c<128); + assert( !(c&0x80) ); // only allow 7-bit ASCII return _chars[c]; } diff --git a/source/simulation/scripting/JSInterface_Entity.cpp b/source/simulation/scripting/JSInterface_Entity.cpp index 12152a63f3..ff0e7eeb5f 100755 --- a/source/simulation/scripting/JSInterface_Entity.cpp +++ b/source/simulation/scripting/JSInterface_Entity.cpp @@ -107,7 +107,8 @@ JSBool JSI_Entity::construct( JSContext* cx, JSObject* obj, unsigned int argc, j } HEntity* handle = new HEntity( g_EntityManager.create( baseEntity, position, orientation ) ); - (*handle)->dispatch( &CMessage( CMessage::EMSG_INIT ) ); + CMessage message( CMessage::EMSG_INIT ); + (*handle)->dispatch( &message ); JSObject* entity = JS_NewObject( cx, &JSI_Entity::JSI_class, NULL, NULL ); JS_SetPrivate( cx, entity, handle ); *rval = OBJECT_TO_JSVAL( entity );