# HG changeset patch # User František Kučera # Date 1430857679 -7200 # Node ID 25a73772efbd56bb635f6c72b8534b2a999af003 # Parent 6d5ee720386c2e72af00a0311e04520347e7c6d5 swap output module logic diff -r 6d5ee720386c -r 25a73772efbd c++/parameter-lister/info/globalcode/parameterLister/OutputModule.cpp --- a/c++/parameter-lister/info/globalcode/parameterLister/OutputModule.cpp Tue May 05 22:21:20 2015 +0200 +++ b/c++/parameter-lister/info/globalcode/parameterLister/OutputModule.cpp Tue May 05 22:27:59 2015 +0200 @@ -1,5 +1,3 @@ -#include - #include "OutputModule.h" #include "terminalCodes/TerminalCodes.h" @@ -15,9 +13,10 @@ output << "" << endl; - for_each(args.begin(), args.end(), [&output, command, fgGreen, fgReset](string s) { - output << fgGreen << command << fgReset << ": " << s << endl; - }); + for (int i = 0; i < args.size(); i++) { + string s = args[i]; + output << i + 1 << ":" << s.length() << " = \"" << s << "\"" << endl; + } output << "" << endl; diff -r 6d5ee720386c -r 25a73772efbd c++/parameter-lister/info/globalcode/parameterLister/TerminalOutputModule.cpp --- a/c++/parameter-lister/info/globalcode/parameterLister/TerminalOutputModule.cpp Tue May 05 22:21:20 2015 +0200 +++ b/c++/parameter-lister/info/globalcode/parameterLister/TerminalOutputModule.cpp Tue May 05 22:27:59 2015 +0200 @@ -1,3 +1,5 @@ +#include + #include "TerminalOutputModule.h" #include "terminalCodes/TerminalCodes.h" @@ -13,10 +15,9 @@ output << fgGreen << "" << fgReset << endl; - for (int i = 0; i < args.size(); i++) { - string s = args[i]; - output << i + 1 << ":" << s.length() << " = \"" << s << "\"" << endl; - } + for_each(args.begin(), args.end(), [&output, command, fgGreen, fgReset](string s) { + output << fgGreen << command << fgReset << ": " << s << endl; + }); output << fgGreen << "" << fgReset << endl;