stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r645738 - /stdcxx/trunk/tests/containers/23.list.cons.cpp
Date Mon, 07 Apr 2008 23:56:09 GMT
Author: sebor
Date: Mon Apr  7 16:56:05 2008
New Revision: 645738

URL: http://svn.apache.org/viewvc?rev=645738&view=rev
Log:
2008-04-07  Martin Sebor  <sebor@roguewave.com>

	* tests/containers/23.list.cons.cpp (ConsRangePtrOverload): Removed
	a pointless const qualifier from the target type of a const_cast to
	silence HP aCC warning #2191-D: type qualifier is meaningless on
	cast type.
	* (test_cons): Cast an argument to the expected type to silence HP
	aCC 6 remark #4271-D: type conversion may lose sign.
	(main): Removed an unused local variable.

Modified:
    stdcxx/trunk/tests/containers/23.list.cons.cpp

Modified: stdcxx/trunk/tests/containers/23.list.cons.cpp
URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/containers/23.list.cons.cpp?rev=645738&r1=645737&r2=645738&view=diff
==============================================================================
--- stdcxx/trunk/tests/containers/23.list.cons.cpp (original)
+++ stdcxx/trunk/tests/containers/23.list.cons.cpp Mon Apr  7 16:56:05 2008
@@ -355,8 +355,8 @@
         const ListVal* const beg = tdata.arg_ + tdata.off2_;
         const ListVal* const end = beg + tdata.ext2_;
 
-        const Iterator first = _RWSTD_CONST_CAST (const Iterator, beg);
-        const Iterator last  = _RWSTD_CONST_CAST (const Iterator, end);
+        const Iterator first = _RWSTD_CONST_CAST (Iterator, beg);
+        const Iterator last  = _RWSTD_CONST_CAST (Iterator, end);
 
         if (Cons (range_alloc) == tdata.func_.which_) {
             ListAlloc alloc;
@@ -483,6 +483,7 @@
         const bool is_class = ListIds::UserClass == func.elem_id_;
 
         const std::size_t x_count_save = UserClass::count_;
+        const std::size_t arg_count    = std::size_t (tcase.size);
 
         try {
             ListIds::OverloadId which =
@@ -507,15 +508,15 @@
                 break;
 
             case Cons (size):
-                ret_ptr = new List (tcase.size);
+                ret_ptr = new List (arg_count);
                 break;
 
             case Cons (size_cref):
-                ret_ptr = new List (tcase.size, arg_val);
+                ret_ptr = new List (arg_count, arg_val);
                 break;
 
             case Cons (size_cref_alloc):
-                ret_ptr = new List (tcase.size, arg_val, arg_alc);
+                ret_ptr = new List (arg_count, arg_val, arg_alc);
                 break;
 
             case Cons (range):
@@ -959,7 +960,6 @@
 int main (int argc, char** argv)
 {
     std::list<int> lst;
-    std::list<int>::iterator it = lst.begin ();
 
     static const ContainerTest
     tests [] = {



Mime
View raw message