diff --git a/src/query.cc b/src/query.cc index 80a793bf..4799145e 100644 --- a/src/query.cc +++ b/src/query.cc @@ -78,11 +78,9 @@ std::vector MapIdToUsr(const IdCache& id_cache, const std::vector MapIdToUsr(const IdCache& id_cache, const std::vector& ids) { return Transform(ids, [&](FuncRef ref) { assert(id_cache.func_id_to_usr.find(ref.id) != id_cache.func_id_to_usr.end()); - - UsrRef result; - result.loc = MapIdToUsr(id_cache, ref.loc); - result.usr = id_cache.func_id_to_usr.find(ref.id)->second; - return result; + return UsrRef( + id_cache.func_id_to_usr.find(ref.id)->second /*usr*/, + MapIdToUsr(id_cache, ref.loc) /*loc*/); }); } std::vector MapIdToUsr(const IdCache& id_cache, const std::vector& ids) { diff --git a/src/query.h b/src/query.h index c318afc5..e70d9b2c 100644 --- a/src/query.h +++ b/src/query.h @@ -22,8 +22,6 @@ struct QueryableLocation { Usr path; Range range; - QueryableLocation() - : path("") {} QueryableLocation(Usr path, Range range) : path(path), range(range) {} @@ -51,7 +49,6 @@ struct UsrRef { Usr usr; QueryableLocation loc; - UsrRef() {} UsrRef(Usr usr, QueryableLocation loc) : usr(usr), loc(loc) {} bool operator==(const UsrRef& other) const {