Minor cleanup items from PR review

This commit is contained in:
Tim Wojtulewicz 2020-07-02 12:55:21 -07:00
parent 3d9d3972f1
commit 3098dd6fbb
6 changed files with 8 additions and 9 deletions

View file

@ -31,7 +31,6 @@ class RuleEndpointState;
class EncapsulationStack;
ZEEK_FORWARD_DECLARE_NAMESPACED(Val, zeek);
ZEEK_FORWARD_DECLARE_NAMESPACED(RecorVal, zeek);
namespace zeek {
using ValPtr = zeek::IntrusivePtr<Val>;

View file

@ -276,6 +276,8 @@ void init();
} // namespace zeek::id
using ID [[deprecated("Remove in v4.1 Use zeek::detail::ID instead.")]] = zeek::detail::ID;
using init_class [[deprecated("Remove in v4.1. Use zeek::detail::InitClass instead.")]] = zeek::detail::InitClass;
[[deprecated("Remove in v4.1. Use zeek::detail::INIT_NONE instead.")]]
constexpr auto INIT_NONE = zeek::detail::INIT_NONE;

View file

@ -26,8 +26,6 @@
#include <cassert>
#include "util.h"
//enum class [[deprecated("Remove in v4.1. Use zeek::ListOrder instead.")]] ListOrder : int { ORDERED, UNORDERED };
namespace zeek {
enum class ListOrder : int { ORDERED, UNORDERED };

View file

@ -223,11 +223,11 @@ Scope* global_scope()
}
const zeek::detail::IDPtr lookup_ID(
const zeek::detail::ID* lookup_ID(
const char* name, const char* module,
bool no_global,
bool same_module_only,
bool check_export)
{
return zeek::detail::lookup_ID(name, module, no_global, same_module_only, check_export);
return zeek::detail::lookup_ID(name, module, no_global, same_module_only, check_export).get();
}

View file

@ -128,7 +128,7 @@ constexpr auto global_scope [[deprecated("Remove in v4.1 Use zeek::detail::globa
// Because of the use of default arguments, this function can't be aliased like the rest.
[[deprecated("Remove in v4.1 Use zeek::detail::lookup_ID instead.")]]
extern const zeek::detail::IDPtr lookup_ID(
extern const zeek::detail::ID* lookup_ID(
const char* name, const char* module,
bool no_global = false,
bool same_module_only = false,

View file

@ -393,7 +393,7 @@ void Val::SetID(detail::ID* id)
}
#endif
bool Val::WouldOverflow(const ::zeek::Type* from_type, const ::zeek::Type* to_type, const Val* val)
bool Val::WouldOverflow(const zeek::Type* from_type, const zeek::Type* to_type, const Val* val)
{
if ( !to_type || !from_type )
return true;