mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Fix clang-tidy bugprone-assignment-in-if-condition warnings
This commit is contained in:
parent
8ce741a7a8
commit
92854e95d3
10 changed files with 28 additions and 25 deletions
|
@ -211,9 +211,11 @@ IDPtr find_global__CPP(const char* g) {
|
|||
RecordTypePtr get_record_type__CPP(const char* record_type_name) {
|
||||
IDPtr existing_type;
|
||||
|
||||
if ( record_type_name && (existing_type = global_scope()->Find(record_type_name)) &&
|
||||
existing_type->GetType()->Tag() == TYPE_RECORD )
|
||||
return cast_intrusive<RecordType>(existing_type->GetType());
|
||||
if ( record_type_name ) {
|
||||
IDPtr existing_type = global_scope()->Find(record_type_name);
|
||||
if ( existing_type && existing_type->GetType()->Tag() == TYPE_RECORD )
|
||||
return cast_intrusive<RecordType>(existing_type->GetType());
|
||||
}
|
||||
|
||||
return make_intrusive<RecordType>(new type_decl_list());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue