No timestamps SIGSEV fix

This commit is contained in:
Lev Dragunov 2017-06-16 12:32:43 +03:00 committed by Patrick Niklaus
parent 73c4bc1411
commit 93d6fd05a9

View File

@ -145,8 +145,17 @@ SubMatchingList mapMatching(SearchEngineData<Algorithm> &engine_working_data,
for (auto t = initial_timestamp + 1; t < candidates_list.size(); ++t)
{
const auto step_time =
trace_timestamps[t] - trace_timestamps[prev_unbroken_timestamps.back()];
const auto step_time = [&] {
if (use_timestamps)
{
return trace_timestamps[t] - trace_timestamps[prev_unbroken_timestamps.back()];
}
else
{
return 1u;
}
}();
const auto max_distance_delta = [&] {
if (use_timestamps)
{