drop unused FieldDesc::hash

This commit is contained in:
Michael Davidsaver
2020-03-09 14:48:39 -07:00
parent bcdf743ae9
commit d10eefac0e
3 changed files with 0 additions and 14 deletions
-6
View File
@@ -133,7 +133,6 @@ void from_wire(Buffer& buf, std::vector<FieldDesc>& descs, TypeStore& cache, uns
auto& fld = descs.back();
fld.code = code;
fld.hash = code.code;
}
switch(code.code) {
@@ -157,7 +156,6 @@ void from_wire(Buffer& buf, std::vector<FieldDesc>& descs, TypeStore& cache, uns
auto& fld = descs.back();
fld.miter.reserve(nfld.size);
fld.hash ^= std::hash<std::string>{}(fld.id);
}
auto& cdescs = code.code==TypeCode::Struct ? descs : descs.back().members;
@@ -180,10 +178,6 @@ void from_wire(Buffer& buf, std::vector<FieldDesc>& descs, TypeStore& cache, uns
if(code.code==TypeCode::Struct)
cfld.parent_index = cindex-cref;
// update hash
// TODO investigate better ways to combine hashes
fld.hash ^= std::hash<std::string>{}(name) ^ cfld.hash;
// update field refs.
fld.miter.emplace_back(name, cindex-cref);
fld.mlookup[name] = cindex-cref;