Reformat the world

This commit is contained in:
Tim Wojtulewicz 2021-09-16 15:35:39 -07:00
parent 194cb24547
commit b2f171ec69
714 changed files with 35149 additions and 35203 deletions

View file

@ -6,11 +6,18 @@
#include "zeek/script_opt/ProfileFunc.h"
namespace zeek::detail {
namespace zeek::detail
{
// Conversions to strings.
inline std::string Fmt(int i) { return std::to_string(i); }
inline std::string Fmt(p_hash_type u) { return std::to_string(u) + "ULL"; }
inline std::string Fmt(int i)
{
return std::to_string(i);
}
inline std::string Fmt(p_hash_type u)
{
return std::to_string(u) + "ULL";
}
extern std::string Fmt(double d);
// Returns the prefix for the scoping used by the compiler.
@ -22,12 +29,11 @@ extern std::string scope_prefix(int scope);
// True if the given function is compilable to C++. If it isn't, and
// the second argument is non-nil, then on return it points to text
// explaining why not.
extern bool is_CPP_compilable(const ProfileFunc* pf,
const char** reason = nullptr);
extern bool is_CPP_compilable(const ProfileFunc* pf, const char** reason = nullptr);
// Helper utilities for file locking, to ensure that hash files
// don't receive conflicting writes due to concurrent compilations.
extern void lock_file(const std::string& fname, FILE* f);
extern void unlock_file(const std::string& fname, FILE* f);
} // zeek::detail
} // zeek::detail