Lua example warning removal fixes for vc++

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10539 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2008-06-21 15:21:29 +00:00
commit 7a68c5c003
4 changed files with 26 additions and 7 deletions

View file

@ -54,14 +54,14 @@ void ShapeOwner::add(Shape* ptr) // this method takes ownership of the object
Shape* ShapeOwner::get(int idx) // this pointer is still owned by the class (assessor)
{
if (idx<0 || idx>=shapes.size())
if (idx < 0 || idx >= static_cast<int>(shapes.size()))
return NULL;
return shapes[idx];
}
Shape* ShapeOwner::remove(int idx) // this method returns memory which must be deleted
{
if (idx<0 || idx>=shapes.size())
if (idx < 0 || idx >= static_cast<int>(shapes.size()))
return NULL;
Shape* ptr=shapes[idx];
shapes.erase(shapes.begin()+idx);