Author: sebor
Date: Wed Oct 19 13:17:34 2005
New Revision: 326679
URL: http://svn.apache.org/viewcvs?rev=326679&view=rev
Log:
2005-10-19 Martin Sebor <[EMAIL PROTECTED]>
STDCXX-56
* deque.cc (_C_assign_n): Renamed a local variable from __it to __ix
to silence gcc -Wshadow warnings.
(_C_assign_range): Same.
* vector.cc (_C_assign_range): Renamed a local to silence gcc -Wshadow
warnings.
(_C_insert_range): Same.
Modified:
incubator/stdcxx/trunk/include/deque.cc
incubator/stdcxx/trunk/include/vector.cc
Modified: incubator/stdcxx/trunk/include/deque.cc
URL:
http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/include/deque.cc?rev=326679&r1=326678&r2=326679&view=diff
==============================================================================
--- incubator/stdcxx/trunk/include/deque.cc (original)
+++ incubator/stdcxx/trunk/include/deque.cc Wed Oct 19 13:17:34 2005
@@ -2,7 +2,7 @@
*
* deque.cc - Non-iniline definitions for the Standard Library deque class
*
- * $Id: //stdlib/dev/include/deque.cc#32 $
+ * $Id$
*
***************************************************************************
*
@@ -19,16 +19,28 @@
*
***************************************************************************
*
- * Copyright (c) 1994-2005 Quovadx, Inc., acting through its Rogue Wave
- * Software division. Licensed under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License. You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0. Unless required by
- * applicable law or agreed to in writing, software distributed under
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
- * CONDITIONS OF ANY KIND, either express or implied. See the License
- * for the specific language governing permissions and limitations under
- * the License.
+ * Copyright (c) 1994-2005 Quovadx, Inc. All Rights Reserved.
+ *
+ * This computer software is owned by Quovadx, Inc. and is protected by
+ * U.S. copyright laws and other laws and by international treaties.
+ * This computer software is furnished by Quovadx, Inc., pursuant to a
+ * written license agreement and may be used, copied, transmitted, and
+ * stored only in accordance with the terms of such license agreement and
+ * with the inclusion of the above copyright notice. This computer
+ * software or any other copies thereof may not be provided or otherwise
+ * made available to any other person.
+ *
+ *
+ * U.S. Government Restricted Rights.
+ *
+ * This computer software: (a) was developed at private expense and is in
+ * all respects the proprietary information of Quovadx, Inc.; (b) was not
+ * developed with government funds; (c) is a trade secret of Quovadx,
+ * Inc. for all purposes of the Freedom of Information Act; and (d) is a
+ * commercial item and thus, pursuant to Section 12.212 of the Federal
+ * Acquisition Regulations (FAR) and DFAR Supplement Section 227.7202,
+ * Government's use, duplication or disclosure of the computer software
+ * is subject to the restrictions set forth by Quovadx, Inc.
*
**************************************************************************/
@@ -367,12 +379,15 @@
const iterator __end = end ();
- for (iterator __it = begin (); __it != __end; ++__it, --__n) {
+ // avoid using the name __i or __it below so as not to trigger
+ // a (bogus) gcc 2.95.2 -Wshadow warning: declaration of `__i'
+ // shadows previous local
+ for (iterator __ix = begin (); __ix != __end; ++__ix, --__n) {
if (size_type () == __n) {
- erase (__it, __end);
+ erase (__ix, __end);
return;
}
- *__it = __x;
+ *__ix = __x;
}
insert (__end, __n, __x);
@@ -501,12 +516,15 @@
const iterator __end = __self->end ();
- for (iterator __it = __self->begin (); __it != __end; ++__it, ++__first) {
+ // avoid using the name __i or __it below so as not to trigger
+ // a (bogus) gcc 2.95.2 -Wshadow warning: declaration of `__i'
+ // shadows previous local
+ for (iterator __ix = __self->begin (); __ix != __end; ++__ix, ++__first) {
if (__first == __last) {
- __self->erase (__it, __end);
+ __self->erase (__ix, __end);
return;
}
- *__it = *__first;
+ *__ix = *__first;
}
__self->insert (__end, __first, __last);
Modified: incubator/stdcxx/trunk/include/vector.cc
URL:
http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/include/vector.cc?rev=326679&r1=326678&r2=326679&view=diff
==============================================================================
--- incubator/stdcxx/trunk/include/vector.cc (original)
+++ incubator/stdcxx/trunk/include/vector.cc Wed Oct 19 13:17:34 2005
@@ -2,7 +2,7 @@
*
* vector.cc - Non-inline definitions for the Standard Library vector class
*
- * $Id: //stdlib/dev/include/vector.cc#31 $
+ * $Id$
*
***************************************************************************
*
@@ -19,16 +19,28 @@
*
***************************************************************************
*
- * Copyright (c) 1994-2005 Quovadx, Inc., acting through its Rogue Wave
- * Software division. Licensed under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License. You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0. Unless required by
- * applicable law or agreed to in writing, software distributed under
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
- * CONDITIONS OF ANY KIND, either express or implied. See the License
- * for the specific language governing permissions and limitations under
- * the License.
+ * Copyright (c) 1994-2005 Quovadx, Inc. All Rights Reserved.
+ *
+ * This computer software is owned by Quovadx, Inc. and is protected by
+ * U.S. copyright laws and other laws and by international treaties.
+ * This computer software is furnished by Quovadx, Inc., pursuant to a
+ * written license agreement and may be used, copied, transmitted, and
+ * stored only in accordance with the terms of such license agreement and
+ * with the inclusion of the above copyright notice. This computer
+ * software or any other copies thereof may not be provided or otherwise
+ * made available to any other person.
+ *
+ *
+ * U.S. Government Restricted Rights.
+ *
+ * This computer software: (a) was developed at private expense and is in
+ * all respects the proprietary information of Quovadx, Inc.; (b) was not
+ * developed with government funds; (c) is a trade secret of Quovadx,
+ * Inc. for all purposes of the Freedom of Information Act; and (d) is a
+ * commercial item and thus, pursuant to Section 12.212 of the Federal
+ * Acquisition Regulations (FAR) and DFAR Supplement Section 227.7202,
+ * Government's use, duplication or disclosure of the computer software
+ * is subject to the restrictions set forth by Quovadx, Inc.
*
**************************************************************************/
@@ -411,13 +423,12 @@
const iterator __end = __self->end ();
- for (iterator __it = __self->begin (); __it != __end;
- ++__it, ++__first) {
+ for (iterator __i = __self->begin (); __i != __end; ++__i, ++__first) {
if (__first == __last) {
- __self->erase (__it, __end);
+ __self->erase (__i, __end);
return;
}
- *__it = *__first;
+ *__i = *__first;
}
__self->insert (__end, __first, __last);
@@ -666,7 +677,10 @@
__tmp.reserve (__self->size () + __size2);
- iterator __i;
+ // avoid using the name __i or __it below so as not to trigger
+ // a (bogus) gcc 2.95.2 -Wshadow warning: declaration of `__i'
+ // shadows previous local
+ iterator __ix;
// copy the initial subsequence of *this, [begin, it), into
// the temporary one element at a time, as if by calling
@@ -674,9 +688,9 @@
// iteration so that an exception thrown by the copy ctor
// will cause the destruction of all already constructed
// elements (by invoking the temporary's dtor)
- for (__i = __self->begin (); __i != __it; ++__i, ++__tmp._C_end) {
+ for (__ix = __self->begin (); __ix != __it; ++__ix, ++__tmp._C_end) {
- __tmp._C_construct (__tmp._C_end, *__i);
+ __tmp._C_construct (__tmp._C_end, *__ix);
}
// append the sequence [first, last) to the temporary,
@@ -688,8 +702,8 @@
}
// copy the remaining elements from *this
- for ( ; __i != __self->end (); ++__i, ++__tmp._C_end) {
- __tmp._C_construct (__tmp._C_end, *__i);
+ for ( ; __ix != __self->end (); ++__ix, ++__tmp._C_end) {
+ __tmp._C_construct (__tmp._C_end, *__ix);
}
// swap *this with the temporary, having its dtor clean up