From 89cbc093c5d8a9f5af256c9736c4cb0ff87da473 Mon Sep 17 00:00:00 2001 From: john30 Date: Sun, 8 Nov 2015 22:16:16 +0100 Subject: [PATCH] simplified --- src/ebusd/mainloop.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/ebusd/mainloop.cpp b/src/ebusd/mainloop.cpp index ab0880a4..9313b7fd 100644 --- a/src/ebusd/mainloop.cpp +++ b/src/ebusd/mainloop.cpp @@ -750,11 +750,9 @@ string MainLoop::executeFind(vector &args) " -c CIRCUIT limit to messages of CIRCUIT (or a part thereof without '-e')\n" " NAME the NAME of the messages to find (or a part thereof without '-e')"; - deque messages; - if (args.size() == argPos) - messages = m_messages->findAll(circuit, "", pb, exact, withRead, withWrite, withPassive); - else - messages = m_messages->findAll(circuit, args[argPos], pb, exact, withRead, withWrite, withPassive); + deque messages = m_messages->findAll( + circuit, args.size() == argPos ? "" : args[argPos], pb, exact, withRead, withWrite, withPassive + ); bool found = false; ostringstream result; @@ -771,7 +769,7 @@ string MainLoop::executeFind(vector &args) } else if (!columns.empty()) { if (found) result << endl; - message->dump(result, columns); + message->dump(result, &columns); } else { if (found) result << endl;