~ubuntu-branches/ubuntu/maverick/swig1.3/maverick

« back to all changes in this revision

Viewing changes to Examples/lua/owner/example.cxx

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2008-11-10 16:29:56 UTC
  • mfrom: (1.2.8 upstream) (2.1.3 lenny)
  • Revision ID: james.westby@ubuntu.com-20081110162956-xue6itkuqhbza87s
Tags: 1.3.36-1ubuntu1
* Merge from debian unstable, remaining changes:
  - Drop pike and libchicken-dev from the build-depends 
    (both are universe)
  - Use python2.5 instead of python2.4.
  - use php5
  - Clean Runtime/ as well.
  - debian/Rules (clean): Remove Lib/ocaml/swigp4.ml.
  - drop "--without-mzscheme", we don't have it in our build-depends

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
 
55
55
Shape* ShapeOwner::get(int idx) // this pointer is still owned by the class (assessor)
56
56
{
57
 
    if (idx<0 || idx>=shapes.size())
 
57
    if (idx < 0 || idx >= static_cast<int>(shapes.size()))
58
58
        return NULL;
59
59
    return shapes[idx];
60
60
}
61
61
 
62
62
Shape* ShapeOwner::remove(int idx) // this method returns memory which must be deleted
63
63
{
64
 
    if (idx<0 || idx>=shapes.size())
 
64
    if (idx < 0 || idx >= static_cast<int>(shapes.size()))
65
65
        return NULL;
66
66
    Shape* ptr=shapes[idx];
67
67
    shapes.erase(shapes.begin()+idx);