diff --git a/src/Camera.cpp b/src/Camera.cpp
index 6cebf1ff3..2955bdca4 100644
--- a/src/Camera.cpp
+++ b/src/Camera.cpp
@@ -33,7 +33,7 @@ void Camera::setActive(Scene* _scene) {
/* Remove the camera from current active scene, if the camera is still
active there */
- if(oldActive && oldActive->camera() == this) oldActive->setCamera(0);
+ if(oldActive && oldActive->camera() == this) oldActive->setCamera(nullptr);
/* Clean the path to scene */
setClean();
@@ -101,7 +101,7 @@ void Camera::setDirty() {
Scene* currentScene = scene();
/* Camera is not part of the scene anymore, remove it from there */
- if(!currentScene) _active->setCamera(0);
+ if(!currentScene) _active->setCamera(nullptr);
/* Otherwise set the scene dirty */
else _active->setDirty();
diff --git a/src/Camera.h b/src/Camera.h
index ea44a34f6..0d6ee7e1c 100644
--- a/src/Camera.h
+++ b/src/Camera.h
@@ -43,19 +43,19 @@ class Camera: public Object {
*
* Calls setOrthographic(2, 1, 1000).
*/
- Camera(Object* parent = 0);
+ Camera(Object* parent = nullptr);
/**
* @brief Scene in which the camera is active
- * @return If the camera is not active anywhere, returns 0.
+ * @return If the camera is not active anywhere, returns nullptr.
*/
inline Scene* active() const { return _active; }
/**
* @brief Make camera active in given scene
*
- * If passed 0 as @c scene and this camera is active in an scene, the
- * camera will be removed from that scene.
+ * If passed nullptr as @c scene and this camera is active in an scene,
+ * the camera will be removed from that scene.
*/
void setActive(Scene* scene);
@@ -127,7 +127,7 @@ class Camera: public Object {
/**
* If the camera was active before and is still active, calls
* setDirty() on the scene, if is not part of the scene anymore, calls
- * setCamera(0) on the scene.
+ * setCamera(nullptr) on the scene.
*/
virtual void setDirty();
diff --git a/src/Light.h b/src/Light.h
index 86325b035..05ee85886 100644
--- a/src/Light.h
+++ b/src/Light.h
@@ -34,7 +34,7 @@ class Light: public Object {
* @brief Constructor
* @param parent Parent object
*/
- inline Light(Object* parent = 0): Object(parent) {}
+ inline Light(Object* parent = nullptr): Object(parent) {}
/**
* @brief Light position relative to the camera
diff --git a/src/Object.cpp b/src/Object.cpp
index bd8ad0d45..0969ebb12 100644
--- a/src/Object.cpp
+++ b/src/Object.cpp
@@ -24,11 +24,11 @@ void Object::setParent(Object* parent) {
if(_parent == parent) return;
/* Set new parent and add the object to new parent children list */
- if(parent != 0) {
+ if(parent != nullptr) {
/* Only Fry can be his own grandfather */
Object* p = parent;
- while(p != 0 && p->parent() != p) {
+ while(p != nullptr && p->parent() != p) {
if(p == this) return;
p = p->parent();
}
@@ -37,7 +37,7 @@ void Object::setParent(Object* parent) {
}
/* Remove the object from old parent children list */
- if(_parent != 0)
+ if(_parent != nullptr)
_parent->_children.erase(this);
_parent = parent;
@@ -51,7 +51,7 @@ Matrix4 Object::transformation(bool absolute) {
Matrix4 t = _transformation;
Object* p = parent();
- while(p != 0) {
+ while(p != nullptr) {
t = p->transformation()*t;
/* We got to the scene, multiply with camera matrix */
@@ -70,7 +70,7 @@ Matrix4 Object::transformation(bool absolute) {
Object::~Object() {
/* Remove the object from parent's children */
- setParent(0);
+ setParent(nullptr);
/* Delete all children */
for(set