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) { std::vector<UsrRef> MapIdToUsr(const IdCache& id_cache, const std::vector<FuncRef>& ids) {
return Transform<FuncRef, UsrRef>(ids, [&](FuncRef ref) { return Transform<FuncRef, UsrRef>(ids, [&](FuncRef ref) {
assert(id_cache.func_id_to_usr.find(ref.id) != id_cache.func_id_to_usr.end()); assert(id_cache.func_id_to_usr.find(ref.id) != id_cache.func_id_to_usr.end());
return UsrRef(
UsrRef result; id_cache.func_id_to_usr.find(ref.id)->second /*usr*/,
result.loc = MapIdToUsr(id_cache, ref.loc); MapIdToUsr(id_cache, ref.loc) /*loc*/);
result.usr = id_cache.func_id_to_usr.find(ref.id)->second;
return result;
}); });
} }
std::vector<QueryableLocation> MapIdToUsr(const IdCache& id_cache, const std::vector<Range>& ids) { std::vector<QueryableLocation> MapIdToUsr(const IdCache& id_cache, const std::vector<Range>& ids) {

View File

@ -22,8 +22,6 @@ struct QueryableLocation {
Usr path; Usr path;
Range range; Range range;
QueryableLocation()
: path("") {}
QueryableLocation(Usr path, Range range) QueryableLocation(Usr path, Range range)
: path(path), range(range) {} : path(path), range(range) {}
@ -51,7 +49,6 @@ struct UsrRef {
Usr usr; Usr usr;
QueryableLocation loc; QueryableLocation loc;
UsrRef() {}
UsrRef(Usr usr, QueryableLocation loc) : usr(usr), loc(loc) {} UsrRef(Usr usr, QueryableLocation loc) : usr(usr), loc(loc) {}
bool operator==(const UsrRef& other) const { bool operator==(const UsrRef& other) const {