mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 23:28:20 +00:00
Reformat Zeek in Spicy style
This largely copies over Spicy's `.clang-format` configuration file. The one place where we deviate is header include order since Zeek depends on headers being included in a certain order.
This commit is contained in:
parent
7b8e7ed72c
commit
f5a76c1aed
786 changed files with 131714 additions and 153609 deletions
|
@ -10,24 +10,21 @@
|
|||
|
||||
#include "zeek/Val.h"
|
||||
|
||||
namespace zeek::detail
|
||||
{
|
||||
namespace zeek::detail {
|
||||
|
||||
// Appends v2 to the vector v1. A separate function because of the
|
||||
// need to support assignment cascades.
|
||||
inline ValPtr vector_append__CPP(VectorValPtr v1, const ValPtr& v2)
|
||||
{
|
||||
v1->Assign(v1->Size(), v2);
|
||||
return v1;
|
||||
}
|
||||
inline ValPtr vector_append__CPP(VectorValPtr v1, const ValPtr& v2) {
|
||||
v1->Assign(v1->Size(), v2);
|
||||
return v1;
|
||||
}
|
||||
|
||||
// Appends vector v2 to the vector v1.
|
||||
inline ValPtr vector_vec_append__CPP(VectorValPtr v1, const VectorValPtr& v2)
|
||||
{
|
||||
if ( ! v2->AddTo(v1.get(), false) )
|
||||
reporter->CPPRuntimeError("incompatible vector element assignment");
|
||||
return v1;
|
||||
}
|
||||
inline ValPtr vector_vec_append__CPP(VectorValPtr v1, const VectorValPtr& v2) {
|
||||
if ( ! v2->AddTo(v1.get(), false) )
|
||||
reporter->CPPRuntimeError("incompatible vector element assignment");
|
||||
return v1;
|
||||
}
|
||||
|
||||
// Unary vector operations.
|
||||
extern VectorValPtr vec_op_pos__CPP(const VectorValPtr& v, const TypePtr& t);
|
||||
|
@ -94,4 +91,4 @@ extern VectorValPtr vec_coerce_to_double__CPP(const VectorValPtr& v, TypePtr tar
|
|||
// that mix vector and scalar arguments.
|
||||
extern VectorValPtr vec_scalar_mixed_with_vector();
|
||||
|
||||
} // namespace zeek::detail
|
||||
} // namespace zeek::detail
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue