Don't implicitly return data for TestIndexer.

This commit is contained in:
Jacob Dufault 2018-01-06 16:30:57 -08:00
parent 476a3f1797
commit d22f994d8a

View File

@ -52,8 +52,12 @@ struct TestIndexer : IIndexer {
const std::vector<FileContents>& file_contents,
PerformanceImportFile* perf) {
auto it = indexes.find(file);
if (it == indexes.end())
if (it == indexes.end()) {
// Don't return any indexes for unexpected data.
assert(false && "no indexes");
return {};
}
// FIXME: allow user to control how many times we return the index for a
// specific file (atm it is always 1)
auto result = std::move(it->second);