mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 00:58:19 +00:00
Move everything in util.h to zeek::util namespace.
This commit includes renaming a number of methods prefixed with bro_ to be prefixed with zeek_.
This commit is contained in:
parent
8862b585fa
commit
8d2d867a65
179 changed files with 1277 additions and 1033 deletions
|
@ -137,7 +137,7 @@ BasicBloomFilter* BasicBloomFilter::Clone() const
|
|||
|
||||
std::string BasicBloomFilter::InternalState() const
|
||||
{
|
||||
return fmt("%" PRIu64, bits->Hash());
|
||||
return zeek::util::fmt("%" PRIu64, bits->Hash());
|
||||
}
|
||||
|
||||
BasicBloomFilter::BasicBloomFilter()
|
||||
|
@ -256,7 +256,7 @@ CountingBloomFilter* CountingBloomFilter::Clone() const
|
|||
|
||||
std::string CountingBloomFilter::InternalState() const
|
||||
{
|
||||
return fmt("%" PRIu64, cells->Hash());
|
||||
return zeek::util::fmt("%" PRIu64, cells->Hash());
|
||||
}
|
||||
|
||||
// TODO: Use partitioning in add/count to allow for reusing CMS bounds.
|
||||
|
|
|
@ -33,7 +33,7 @@ Hasher::seed_t Hasher::MakeSeed(const void* data, size_t size)
|
|||
|
||||
else
|
||||
{
|
||||
unsigned int first_seed = initial_seed();
|
||||
unsigned int first_seed = zeek::util::initial_seed();
|
||||
zeek::detail::hash_update(ctx, &first_seed, sizeof(first_seed));
|
||||
}
|
||||
|
||||
|
@ -119,7 +119,7 @@ DefaultHasher::DefaultHasher(size_t k, Hasher::seed_t seed)
|
|||
for ( size_t i = 1; i <= k; ++i )
|
||||
{
|
||||
seed_t s = Seed();
|
||||
s.h[0] += zeek::prng(i);
|
||||
s.h[0] += zeek::util::prng(i);
|
||||
hash_functions.push_back(UHF(s));
|
||||
}
|
||||
}
|
||||
|
@ -149,7 +149,7 @@ bool DefaultHasher::Equals(const Hasher* other) const
|
|||
}
|
||||
|
||||
DoubleHasher::DoubleHasher(size_t k, seed_t seed)
|
||||
: Hasher(k, seed), h1(seed + zeek::prng(1)), h2(seed + zeek::prng(2))
|
||||
: Hasher(k, seed), h1(seed + zeek::util::prng(1)), h2(seed + zeek::util::prng(2))
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue