mirror of
https://github.com/zeek/zeek.git
synced 2025-10-11 11:08:20 +00:00
Move #define outside of max_type for clarity
This commit is contained in:
parent
6860d5b083
commit
7243292136
1 changed files with 4 additions and 4 deletions
|
@ -2123,6 +2123,10 @@ int is_assignable(BroType* t)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define CHECK_TYPE(t) \
|
||||||
|
if ( t1 == t || t2 == t ) \
|
||||||
|
return t;
|
||||||
|
|
||||||
TypeTag max_type(TypeTag t1, TypeTag t2)
|
TypeTag max_type(TypeTag t1, TypeTag t2)
|
||||||
{
|
{
|
||||||
if ( t1 == TYPE_INTERVAL || t1 == TYPE_TIME )
|
if ( t1 == TYPE_INTERVAL || t1 == TYPE_TIME )
|
||||||
|
@ -2132,10 +2136,6 @@ TypeTag max_type(TypeTag t1, TypeTag t2)
|
||||||
|
|
||||||
if ( BothArithmetic(t1, t2) )
|
if ( BothArithmetic(t1, t2) )
|
||||||
{
|
{
|
||||||
#define CHECK_TYPE(t) \
|
|
||||||
if ( t1 == t || t2 == t ) \
|
|
||||||
return t;
|
|
||||||
|
|
||||||
CHECK_TYPE(TYPE_DOUBLE);
|
CHECK_TYPE(TYPE_DOUBLE);
|
||||||
CHECK_TYPE(TYPE_INT);
|
CHECK_TYPE(TYPE_INT);
|
||||||
CHECK_TYPE(TYPE_COUNT);
|
CHECK_TYPE(TYPE_COUNT);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue