mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
modified merge_types() to skip work if given identical types, which
also preserves type names (useful for -O gen-C++)
This commit is contained in:
parent
a2a47ba334
commit
7ed3f79c87
1 changed files with 3 additions and 0 deletions
|
@ -2376,6 +2376,9 @@ TypeListPtr merge_list_types(const Type* t1, const Type* t2) {
|
||||||
}
|
}
|
||||||
|
|
||||||
TypePtr merge_types(const TypePtr& arg_t1, const TypePtr& arg_t2) {
|
TypePtr merge_types(const TypePtr& arg_t1, const TypePtr& arg_t2) {
|
||||||
|
if ( arg_t1 == arg_t2 )
|
||||||
|
return arg_t1;
|
||||||
|
|
||||||
auto t1 = arg_t1.get();
|
auto t1 = arg_t1.get();
|
||||||
auto t2 = arg_t2.get();
|
auto t2 = arg_t2.get();
|
||||||
// t1 = flatten_type(t1);
|
// t1 = flatten_type(t1);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue