git-svn-id: https://reactphysics3d.googlecode.com/svn/trunk@108 92aac97c-a6ce-11dd-a772-7fcde58d38e6
This commit is contained in:
parent
8e0a7740dd
commit
7c1f174388
|
@ -46,16 +46,16 @@ Context::Context() {
|
||||||
Context::~Context() {
|
Context::~Context() {
|
||||||
// Delete all the objects in vectObjects
|
// Delete all the objects in vectObjects
|
||||||
for(unsigned int i=0; i<vectObjects.size(); ++i) {
|
for(unsigned int i=0; i<vectObjects.size(); ++i) {
|
||||||
delete vectObjects[0];
|
delete vectObjects[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Method to get an object from the context
|
// Method to get an object from the context
|
||||||
Object& Context::getObject(int objectIndex) const {
|
Object& Context::getObject(int objectIndex) const {
|
||||||
// WE HAVE TO ADD HERE AN EXCEPTION IMPLEMENTATION
|
// TODO : WE HAVE TO ADD HERE AN EXCEPTION IMPLEMENTATION
|
||||||
|
|
||||||
// Return the object from the context
|
// Return the object from the context
|
||||||
return (*vectObjects.at(objectIndex)); // THROWN AN EXCEPTION IF INDEX IS OUT OF THE BOUNDS
|
return (*vectObjects.at(objectIndex)); // TODO : THROWN AN EXCEPTION IF INDEX IS OUT OF THE BOUNDS
|
||||||
}
|
}
|
||||||
|
|
||||||
// Method for adding an object into the context
|
// Method for adding an object into the context
|
||||||
|
|
Loading…
Reference in New Issue
Block a user