[Positioning] Output*: do not output empty RequestList
This commit is contained in:
parent
773fd559cd
commit
948bd577a2
|
@ -11,5 +11,6 @@ void OutputCSV::write(const Result &result)
|
|||
|
||||
void OutputCSV::write(const ResultList &results)
|
||||
{
|
||||
file.write_text(results.to_csv() + '\n') ;
|
||||
if (! results.empty())
|
||||
file.write_text(results.to_csv() + '\n') ;
|
||||
}
|
||||
|
|
|
@ -12,5 +12,8 @@ void OutputTerminal::write(const Result &result)
|
|||
|
||||
void OutputTerminal::write(const ResultList &results)
|
||||
{
|
||||
output_stream << results << '\n' ;
|
||||
if (results.empty())
|
||||
output_stream << "There is no result.\n" ;
|
||||
else
|
||||
output_stream << results << '\n' ;
|
||||
}
|
||||
|
|
|
@ -80,7 +80,8 @@ void OutputUDPSocket::write(const Result &result)
|
|||
|
||||
void OutputUDPSocket::write(const ResultList &results)
|
||||
{
|
||||
send_data(results.to_csv()) ;
|
||||
if (! results.empty())
|
||||
send_data(results.to_csv()) ;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue