From 16cbf69d5d55a01a44161cd89003c7e6ee9e252a Mon Sep 17 00:00:00 2001 From: Benjamin BOUVIER Date: Fri, 7 Sep 2012 11:43:43 -0400 Subject: [PATCH] MPI Distrib exp: replace next generated waiting time by 0 if it's negative --- eo/test/mpi/t-mpi-distrib-exp.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eo/test/mpi/t-mpi-distrib-exp.cpp b/eo/test/mpi/t-mpi-distrib-exp.cpp index 1b390667..e34170de 100644 --- a/eo/test/mpi/t-mpi-distrib-exp.cpp +++ b/eo/test/mpi/t-mpi-distrib-exp.cpp @@ -34,7 +34,9 @@ class Distribution : public std::vector< type > { for( unsigned i = 0; i < size; ++i ) { - push_back( next_element() ); + int next = next_element(); + if( next < 0 ) next = 0; + push_back( next ); } }