Skip to content

Commit

Permalink
Bug 563195: Avoid triggering -Wshadow warnings in mfbt/. r=Waldo
Browse files Browse the repository at this point in the history
  • Loading branch information
nnethercote committed Feb 18, 2013
1 parent b986698 commit a97328e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions mfbt/RangedPtr.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ class RangedPtr
MOZ_ASSERT(ptr <= rangeEnd);
}

/* Creates a new pointer for |ptr|, restricted to this pointer's range. */
RangedPtr<T> create(T *ptr) const {
/* Creates a new pointer for |p|, restricted to this pointer's range. */
RangedPtr<T> create(T *p) const {
#ifdef DEBUG
return RangedPtr<T>(ptr, rangeStart, rangeEnd);
return RangedPtr<T>(p, rangeStart, rangeEnd);
#else
return RangedPtr<T>(ptr, NULL, size_t(0));
return RangedPtr<T>(p, NULL, size_t(0));
#endif
}

Expand Down
4 changes: 2 additions & 2 deletions mfbt/Scoped.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ class Scoped
{
MOZ_GUARD_OBJECT_NOTIFIER_INIT;
}
explicit Scoped(const Resource& value
explicit Scoped(const Resource& v
MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
: value(value)
: value(v)
{
MOZ_GUARD_OBJECT_NOTIFIER_INIT;
}
Expand Down
2 changes: 1 addition & 1 deletion mfbt/WeakPtr.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class SupportsWeakPtr
class WeakReference : public RefCounted<WeakReference>
{
public:
explicit WeakReference(T* ptr) : ptr(ptr) {}
explicit WeakReference(T* p) : ptr(p) {}
T* get() const {
return ptr;
}
Expand Down

0 comments on commit a97328e

Please sign in to comment.