mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 00:28:21 +00:00
Fix clang-tidy bugprone-branch-clone warnings
This commit is contained in:
parent
92854e95d3
commit
dbecfb5a2a
32 changed files with 132 additions and 247 deletions
|
@ -232,16 +232,8 @@ bool CompositeHash::RecoverOneVal(const HashKey& hk, Type* t, ValPtr* pval, bool
|
|||
if ( ! pvt )
|
||||
reporter->InternalError("bad aggregate Val in CompositeHash::RecoverOneVal()");
|
||||
|
||||
else if ( t->Tag() != TYPE_FUNC && ! same_type(pvt, t) )
|
||||
// ### Maybe fix later, but may be fundamentally un-checkable --US
|
||||
{
|
||||
reporter->InternalError("inconsistent aggregate Val in CompositeHash::RecoverOneVal()");
|
||||
*pval = nullptr;
|
||||
return false;
|
||||
}
|
||||
|
||||
// ### A crude approximation for now.
|
||||
else if ( t->Tag() == TYPE_FUNC && pvt->Tag() != TYPE_FUNC ) {
|
||||
else if ( (t->Tag() != TYPE_FUNC && ! same_type(pvt, t)) ||
|
||||
(t->Tag() == TYPE_FUNC && pvt->Tag() != TYPE_FUNC) ) {
|
||||
reporter->InternalError("inconsistent aggregate Val in CompositeHash::RecoverOneVal()");
|
||||
*pval = nullptr;
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue