// Add a row for the decoder if it doesn't have a row list
if (!decc->annotation_rows)
- rows.push_back(Row(decc));
+ rows.emplace_back(decc);
// Add the decoder rows
for (const GSList *l = decc->annotation_rows; l; l = l->next) {
const srd_decoder_annotation_row *const ann_row =
(srd_decoder_annotation_row *)l->data;
assert(ann_row);
- rows.push_back(Row(decc, ann_row));
+ rows.emplace_back(decc, ann_row);
}
}
// Store the initial state
last_sample = (get_unpacked_sample(start) & sig_mask) != 0;
- edges.push_back(pair<int64_t, bool>(index++, last_sample));
+ edges.emplace_back(index++, last_sample);
while (index + block_length <= end) {
//----- Continue to search -----//
// Store the final state
const bool final_sample =
(get_unpacked_sample(final_index - 1) & sig_mask) != 0;
- edges.push_back(pair<int64_t, bool>(index, final_sample));
+ edges.emplace_back(index, final_sample);
index = final_index;
last_sample = final_sample;
// Add the final state
const bool end_sample = get_unpacked_sample(end) & sig_mask;
if (last_sample != end_sample)
- edges.push_back(pair<int64_t, bool>(end, end_sample));
- edges.push_back(pair<int64_t, bool>(end + 1, end_sample));
+ edges.emplace_back(end, end_sample);
+ edges.emplace_back(end + 1, end_sample);
}
uint64_t LogicSegment::get_subsample(int level, uint64_t offset) const
settings.setValue("device_type", "hardware");
settings.beginGroup("device");
- key_list.push_back("vendor");
- key_list.push_back("model");
- key_list.push_back("version");
- key_list.push_back("serial_num");
- key_list.push_back("connection_id");
+ key_list.emplace_back("vendor");
+ key_list.emplace_back("model");
+ key_list.emplace_back("version");
+ key_list.emplace_back("serial_num");
+ key_list.emplace_back("connection_id");
dev_info = device_manager_.get_device_info(device_);
// Re-select last used device if possible but only if it's not demo
settings.beginGroup("device");
- key_list.push_back("vendor");
- key_list.push_back("model");
- key_list.push_back("version");
- key_list.push_back("serial_num");
- key_list.push_back("connection_id");
+ key_list.emplace_back("vendor");
+ key_list.emplace_back("model");
+ key_list.emplace_back("version");
+ key_list.emplace_back("serial_num");
+ key_list.emplace_back("connection_id");
for (string key : key_list) {
const QString k = QString::fromStdString(key);