Merge remote-tracking branch 'origin/topic/justin/conn-remove-empty-string-allocation'

* origin/topic/justin/conn-remove-empty-string-allocation:
  Avoid allocation of 0 length strings on new conns
This commit is contained in:
Robin Sommer 2021-09-23 12:24:06 +02:00
commit c5ebe299b1
3 changed files with 13 additions and 2 deletions

View file

@ -271,7 +271,9 @@ const RecordValPtr& Connection::GetVal()
conn_val->AssignTime(3, start_time); // ###
conn_val->AssignInterval(4, last_time - start_time);
conn_val->Assign(6, history);
if ( history.size() )
conn_val->Assign(6, history);
conn_val->SetOrigin(this);