remove some default ctors

This commit is contained in:
Jacob Dufault 2017-04-07 00:01:21 -07:00
parent 590797bcf2
commit 3368065d94
2 changed files with 3 additions and 8 deletions

View File

@ -78,11 +78,9 @@ std::vector<Usr> MapIdToUsr(const IdCache& id_cache, const std::vector<IndexVarI
std::vector<UsrRef> MapIdToUsr(const IdCache& id_cache, const std::vector<FuncRef>& ids) {
return Transform<FuncRef, UsrRef>(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<QueryableLocation> MapIdToUsr(const IdCache& id_cache, const std::vector<Range>& ids) {

View File

@ -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 {