From 558049e972fde4e4ba3f60c1982b63d324385bf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Abecasis?= Date: Tue, 21 Feb 2012 16:32:35 +0100 Subject: [PATCH] Fix warnings on shadowing data members with arguments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Example emitted by GCC 4.2.1: warning: declaration of ‘iter’ shadows a member of 'this' Change-Id: I288da01c511a1404bf41881a6c96a5f3cd00d0a7 Reviewed-by: Jędrzej Nowacki --- src/corelib/tools/qarraydataops.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/corelib/tools/qarraydataops.h b/src/corelib/tools/qarraydataops.h index cfb1863d7a..1b8ed3372d 100644 --- a/src/corelib/tools/qarraydataops.h +++ b/src/corelib/tools/qarraydataops.h @@ -163,9 +163,9 @@ struct QGenericArrayOps struct Destructor { - Destructor(T *&iter) - : iter(&iter) - , end(iter) + Destructor(T *&it) + : iter(&it) + , end(it) { } @@ -231,10 +231,10 @@ struct QMovableArrayOps struct ReversibleDisplace { - ReversibleDisplace(T *begin, T *end, size_t displace) - : begin(begin) - , end(end) - , displace(displace) + ReversibleDisplace(T *start, T *finish, size_t diff) + : begin(start) + , end(finish) + , displace(diff) { ::memmove(begin + displace, begin, (end - begin) * sizeof(T)); } @@ -255,7 +255,7 @@ struct QMovableArrayOps struct CopyConstructor { - CopyConstructor(T *where) : where(where) {} + CopyConstructor(T *w) : where(w) {} void copy(const T *src, const T *const srcEnd) {