From 49144445f77204558c15fda03ef63eae9fffedf1 Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Fri, 22 Oct 2021 10:51:32 -0500 Subject: [PATCH] minor --- test/testmon.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/testmon.cpp b/test/testmon.cpp index 3b0e24a..b0581a9 100644 --- a/test/testmon.cpp +++ b/test/testmon.cpp @@ -75,15 +75,15 @@ struct BasicTest { static Value pop(const std::shared_ptr& sub, epicsEvent& evt) { - Value ret(sub->pop()); - while(!ret) { - if(!evt.wait(5.0)) { + while(true) { + if(auto ret = sub->pop()) { + return ret; + + } else if (!evt.wait(5.0)) { testFail("timeout waiting for event"); - } else { - ret = sub->pop(); + return Value(); } } - return ret; } void orphan()