mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Base: Clean up explicit uses of namespaces in places where they're not necessary.
This commit covers all of the common and base classes.
This commit is contained in:
parent
9f802b2a4d
commit
fe0c22c789
240 changed files with 6823 additions and 6787 deletions
|
@ -24,7 +24,7 @@ void UID::Set(bro_uint_t bits, const uint64_t* v, size_t n)
|
|||
size_t size = res.rem ? res.quot + 1 : res.quot;
|
||||
|
||||
for ( size_t i = 0; i < size; ++i )
|
||||
uid[i] = v && i < n ? v[i] : zeek::util::calculate_unique_id();
|
||||
uid[i] = v && i < n ? v[i] : util::calculate_unique_id();
|
||||
|
||||
if ( res.rem )
|
||||
uid[0] >>= 64 - res.rem;
|
||||
|
@ -33,11 +33,11 @@ void UID::Set(bro_uint_t bits, const uint64_t* v, size_t n)
|
|||
std::string UID::Base62(std::string prefix) const
|
||||
{
|
||||
if ( ! initialized )
|
||||
zeek::reporter->InternalError("use of uninitialized UID");
|
||||
reporter->InternalError("use of uninitialized UID");
|
||||
|
||||
char tmp[sizeof(uid) * 8 + 1]; // enough for even binary representation
|
||||
for ( size_t i = 0; i < BRO_UID_LEN; ++i )
|
||||
prefix.append(zeek::util::uitoa_n(uid[i], tmp, sizeof(tmp), 62));
|
||||
prefix.append(util::uitoa_n(uid[i], tmp, sizeof(tmp), 62));
|
||||
|
||||
return prefix;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue