Fixed explicit ctor bugs in stress tests
[libcds.git] / test / stress / set / insdel_find / set_insdelfind.h
index 7ac63b1856e869b2bc3dff435a79e9ad5b1002d5..a8778307dcd21bfc01079e4f4ea13be67fd6c7b6 100644 (file)
@@ -107,8 +107,10 @@ namespace set {
                 unsigned int i = 0;
                 size_t const nNormalize = size_t(-1) / ( fixture.s_nSetSize * 2);
 
                 unsigned int i = 0;
                 size_t const nNormalize = size_t(-1) / ( fixture.s_nSetSize * 2);
 
+                typedef typename Set::value_type value_type;
+
                 size_t nRand = 0;
                 size_t nRand = 0;
-                while ( !time_elapsed() ) {
+                while ( !time_elapsed()) {
                     nRand = cds::bitop::RandXorShift(nRand);
                     size_t n = nRand / nNormalize;
                     switch ( pAct[i] ) {
                     nRand = cds::bitop::RandXorShift(nRand);
                     size_t n = nRand / nNormalize;
                     switch ( pAct[i] ) {
@@ -152,7 +154,7 @@ namespace set {
                     pInitArr[i] = i * 2 + 1;
                 shuffle( pInitArr, pEnd );
                 for ( size_t * p = pInitArr; p < pEnd; ++p )
                     pInitArr[i] = i * 2 + 1;
                 shuffle( pInitArr, pEnd );
                 for ( size_t * p = pInitArr; p < pEnd; ++p )
-                    testSet.insert( typename Set::value_type( *p, *p ) );
+                    testSet.insert( typename Set::value_type( *p, *p ));
                 delete [] pInitArr;
             }
 
                 delete [] pInitArr;
             }
 
@@ -196,7 +198,7 @@ namespace set {
             {
                 ASSERT_TRUE( std::chrono::duration_cast<std::chrono::seconds>(duration).count() > 0 );
                 size_t nTotalOps = nInsertSuccess + nInsertFailed + nDeleteSuccess + nDeleteFailed + nFindSuccess + nFindFailed;
             {
                 ASSERT_TRUE( std::chrono::duration_cast<std::chrono::seconds>(duration).count() > 0 );
                 size_t nTotalOps = nInsertSuccess + nInsertFailed + nDeleteSuccess + nDeleteFailed + nFindSuccess + nFindFailed;
-                propout() << std::make_pair( "avg_speed", nTotalOps / std::chrono::duration_cast<std::chrono::seconds>(duration).count() );
+                propout() << std::make_pair( "avg_speed", nTotalOps / std::chrono::duration_cast<std::chrono::seconds>(duration).count());
             }
 
 
             }