mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
different fix for MSVC compiler issues
This commit is contained in:
parent
1f61afa56b
commit
11dc4c8ce9
2 changed files with 6 additions and 8 deletions
|
@ -28,11 +28,10 @@ struct NewRef
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* These have to be forward-declared and known here in order for us to be able
|
* This has to be forward declared and known here in order for us to be able
|
||||||
* cast them in the `Unref` function.
|
* cast this in the `Unref` function.
|
||||||
*/
|
*/
|
||||||
class OpaqueVal;
|
class OpaqueVal;
|
||||||
class TypeVal;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An intrusive, reference counting smart pointer implementation. Much like
|
* An intrusive, reference counting smart pointer implementation. Much like
|
||||||
|
@ -121,10 +120,9 @@ public:
|
||||||
{
|
{
|
||||||
if ( ptr_ )
|
if ( ptr_ )
|
||||||
{
|
{
|
||||||
// For some `Val` subclasses the MSVC compiler does
|
// Specializing `OpaqueVal` as MSVC compiler does not detect it
|
||||||
// not detect them as inheriting from `zeek::Obj`,
|
// inheriting from `zeek::Obj` so we have to do that manually.
|
||||||
// so we have to do that manually.
|
if constexpr ( std::is_same_v<T, OpaqueVal> )
|
||||||
if constexpr ( std::is_base_of_v<Obj, T> )
|
|
||||||
Unref(reinterpret_cast<zeek::Obj*>(ptr_));
|
Unref(reinterpret_cast<zeek::Obj*>(ptr_));
|
||||||
else
|
else
|
||||||
Unref(ptr_);
|
Unref(ptr_);
|
||||||
|
|
|
@ -15,13 +15,13 @@
|
||||||
#include "zeek/IntrusivePtr.h"
|
#include "zeek/IntrusivePtr.h"
|
||||||
#include "zeek/Obj.h"
|
#include "zeek/Obj.h"
|
||||||
#include "zeek/Traverse.h"
|
#include "zeek/Traverse.h"
|
||||||
#include "zeek/ZVal.h"
|
|
||||||
#include "zeek/ZeekList.h"
|
#include "zeek/ZeekList.h"
|
||||||
|
|
||||||
namespace zeek
|
namespace zeek
|
||||||
{
|
{
|
||||||
|
|
||||||
class Val;
|
class Val;
|
||||||
|
union ZVal;
|
||||||
class EnumVal;
|
class EnumVal;
|
||||||
class RecordVal;
|
class RecordVal;
|
||||||
class TableVal;
|
class TableVal;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue