diff --git a/sandboxed_api/var_abstract.h b/sandboxed_api/var_abstract.h index 8142fcc..2c9747b 100644 --- a/sandboxed_api/var_abstract.h +++ b/sandboxed_api/var_abstract.h @@ -64,6 +64,8 @@ class Var : public Pointable { Var(const Var&) = delete; Var& operator=(const Var&) = delete; + virtual ~Var(); + // Returns the address of the storage (remote side). virtual void* GetRemote() const { return remote_; } @@ -85,17 +87,15 @@ class Var : public Pointable { // Returns a string representation of the variable value. virtual std::string ToString() const = 0; - virtual ~Var(); - - protected: - Var() = default; - // Functions to get pointers with certain type of synchronization schemes. Ptr* PtrNone(); Ptr* PtrBoth(); Ptr* PtrBefore(); Ptr* PtrAfter(); + protected: + Var() = default; + // Set pointer to local storage class. void SetLocal(void* local) { local_ = local; } diff --git a/sandboxed_api/var_array.h b/sandboxed_api/var_array.h index 498dd43..3d495b7 100644 --- a/sandboxed_api/var_array.h +++ b/sandboxed_api/var_array.h @@ -35,10 +35,6 @@ namespace sapi::v { template class Array : public Var { public: - using Var::PtrAfter; - using Var::PtrBefore; - using Var::PtrBoth; - // The array is not owned by this object. Array(T* arr, size_t nelem) : arr_(arr), diff --git a/sandboxed_api/var_int.h b/sandboxed_api/var_int.h index a5ba587..23ea97b 100644 --- a/sandboxed_api/var_int.h +++ b/sandboxed_api/var_int.h @@ -28,10 +28,6 @@ namespace sapi::v { template class IntBase : public Reg { public: - using Var::PtrAfter; - using Var::PtrBefore; - using Var::PtrBoth; - explicit IntBase(T value = {}) { this->SetValue(value); } }; diff --git a/sandboxed_api/var_lenval.h b/sandboxed_api/var_lenval.h index 3047796..54db48b 100644 --- a/sandboxed_api/var_lenval.h +++ b/sandboxed_api/var_lenval.h @@ -37,10 +37,6 @@ class Proto; // use protobufs as they are easier to handle. class LenVal : public Var { public: - using Var::PtrAfter; - using Var::PtrBefore; - using Var::PtrBoth; - explicit LenVal(const char* data, uint64_t size) : array_(const_cast(reinterpret_cast(data)), size), diff --git a/sandboxed_api/var_proto.h b/sandboxed_api/var_proto.h index fc81713..8bf4e9f 100644 --- a/sandboxed_api/var_proto.h +++ b/sandboxed_api/var_proto.h @@ -38,10 +38,6 @@ class Proto : public Var { static_assert(std::is_base_of::value, "Template argument must be a proto message"); - using Var::PtrAfter; - using Var::PtrBefore; - using Var::PtrBoth; - ABSL_DEPRECATED("Use Proto<>::FromMessage() instead") explicit Proto(const T& proto) : wrapped_var_(SerializeProto(proto).value()) {} diff --git a/sandboxed_api/var_struct.h b/sandboxed_api/var_struct.h index 810ddac..14a232f 100644 --- a/sandboxed_api/var_struct.h +++ b/sandboxed_api/var_struct.h @@ -27,10 +27,6 @@ namespace sapi::v { template class Struct : public Var { public: - using Var::PtrAfter; - using Var::PtrBefore; - using Var::PtrBoth; - // Forwarding constructor to initalize the struct_ field. template explicit Struct(Args&&... args) : struct_(std::forward(args)...) {