From 38f2ea34f466d8264f7a060627eece5b3cbc40ba Mon Sep 17 00:00:00 2001 From: Kane York Date: Thu, 13 Aug 2020 16:51:04 -0700 Subject: refactor(tvix): add explicit copy/move constructors for Value This is in preparation for making some of Value's members into refcounted ('smart') pointers. Change-Id: Ibc54e23ac35766a2fd4e14871c9a7c936a603778 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1743 Tested-by: BuildkiteCI Reviewed-by: glittershark --- third_party/nix/src/libexpr/value.hh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'third_party/nix/src/libexpr/value.hh') diff --git a/third_party/nix/src/libexpr/value.hh b/third_party/nix/src/libexpr/value.hh index 6bb694d1830b..85ce9e7a1ba0 100644 --- a/third_party/nix/src/libexpr/value.hh +++ b/third_party/nix/src/libexpr/value.hh @@ -105,6 +105,13 @@ struct Value { NixFloat fpoint; }; + Value() : type(tInt), integer(0) {} + Value(const Value& copy); + Value(Value&& move); + ~Value() {} + Value& operator=(const Value& copy); + Value& operator=(Value&& move); + bool isList() const { return type == tList; } size_t listSize() const { return list->size(); } -- cgit 1.4.1