mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 08:08:19 +00:00
Switch OpaqueVal::SerializeType() to IntrusivePtr
This commit is contained in:
parent
377c8a4762
commit
5742810293
3 changed files with 5 additions and 5 deletions
|
@ -96,7 +96,7 @@ IntrusivePtr<OpaqueVal> OpaqueVal::Unserialize(const broker::data& data)
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
broker::expected<broker::data> OpaqueVal::SerializeType(BroType* t)
|
broker::expected<broker::data> OpaqueVal::SerializeType(const IntrusivePtr<BroType>& t)
|
||||||
{
|
{
|
||||||
if ( t->InternalType() == TYPE_INTERNAL_ERROR )
|
if ( t->InternalType() == TYPE_INTERNAL_ERROR )
|
||||||
return broker::ec::invalid_data;
|
return broker::ec::invalid_data;
|
||||||
|
@ -818,7 +818,7 @@ broker::expected<broker::data> BloomFilterVal::DoSerialize() const
|
||||||
|
|
||||||
if ( type )
|
if ( type )
|
||||||
{
|
{
|
||||||
auto t = SerializeType(type.get());
|
auto t = SerializeType(type);
|
||||||
if ( ! t )
|
if ( ! t )
|
||||||
return broker::ec::invalid_data;
|
return broker::ec::invalid_data;
|
||||||
|
|
||||||
|
@ -913,7 +913,7 @@ broker::expected<broker::data> CardinalityVal::DoSerialize() const
|
||||||
|
|
||||||
if ( type )
|
if ( type )
|
||||||
{
|
{
|
||||||
auto t = SerializeType(type.get());
|
auto t = SerializeType(type);
|
||||||
if ( ! t )
|
if ( ! t )
|
||||||
return broker::ec::invalid_data;
|
return broker::ec::invalid_data;
|
||||||
|
|
||||||
|
|
|
@ -148,7 +148,7 @@ protected:
|
||||||
* Helper function for derived class that need to record a type
|
* Helper function for derived class that need to record a type
|
||||||
* during serialization.
|
* during serialization.
|
||||||
*/
|
*/
|
||||||
static broker::expected<broker::data> SerializeType(BroType* t);
|
static broker::expected<broker::data> SerializeType(const IntrusivePtr<BroType>& t);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper function for derived class that need to restore a type
|
* Helper function for derived class that need to restore a type
|
||||||
|
|
|
@ -408,7 +408,7 @@ broker::expected<broker::data> TopkVal::DoSerialize() const
|
||||||
|
|
||||||
if ( type )
|
if ( type )
|
||||||
{
|
{
|
||||||
auto t = SerializeType(type.get());
|
auto t = SerializeType(type);
|
||||||
if ( ! t )
|
if ( ! t )
|
||||||
return broker::ec::invalid_data;
|
return broker::ec::invalid_data;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue