--- trunk/OOPSE-2.0/src/brains/BlockSnapshotManager.cpp 2005/02/15 15:24:54 2030 +++ trunk/OOPSE-2.0/src/brains/BlockSnapshotManager.cpp 2005/02/15 17:11:35 2031 @@ -77,7 +77,7 @@ BlockSnapshotManager::BlockSnapshotManager(SimInfo* in //the last block may not have nSnapshotPerBlock frames, we need to consider this special situation blocks_.back().second = nframes_; - snapshots_.insert(snapshots_.begin(), nframes_,(Snapshot*)(NULL)); + snapshots_.insert(snapshots_.begin(), nframes_, static_cast(NULL)); } @@ -97,7 +97,13 @@ int BlockSnapshotManager::getNActiveBlocks() { } int BlockSnapshotManager::getNActiveBlocks() { +#ifdef __RWSTD + int count = 0; + std::count_if(activeBlocks_.begin(), activeBlocks_.end(), std::bind2nd(std::not_equal_to(), -1), count); + return count; +#else return std::count_if(activeBlocks_.begin(), activeBlocks_.end(), std::bind2nd(std::not_equal_to(), -1)); +#endif } bool BlockSnapshotManager::isBlockActive(int block) {