Made code -Wshadow clean, missed a bunch of issues in the last commit
[supertux.git] / src / util / ref.hpp
index 6086867..199cb2c 100644 (file)
@@ -25,8 +25,8 @@ template<typename T>
 class Ref
 {
 public:
-  Ref(T* object = 0)
-    : object(object)
+  Ref(T* object_ = 0)
+    : object(object_)
   {
     if(object)
       object->ref();
@@ -49,13 +49,13 @@ public:
     return *this;
   }
 
-  Ref<T>& operator= (T* object)
+  Ref<T>& operator= (T* object_)
   {
-    if(object)
-      object->ref();
+    if(object_)
+      object_->ref();
     if(this->object)
       this->object->unref();
-    this->object = object;
+    this->object = object_;
 
     return *this;
   }