From bd4c1479b417151162a887eb641ae923c5e4b201 Mon Sep 17 00:00:00 2001 From: Tao He Date: Fri, 8 Oct 2021 11:09:51 +0800 Subject: [PATCH] Fixes the compilation errors. Signed-off-by: Tao He --- etcd/v3/Transaction.hpp | 3 ++- src/v3/Transaction.cpp | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/etcd/v3/Transaction.hpp b/etcd/v3/Transaction.hpp index a438b1b..8dd4218 100644 --- a/etcd/v3/Transaction.hpp +++ b/etcd/v3/Transaction.hpp @@ -31,7 +31,8 @@ public: Transaction(std::string const&); virtual ~Transaction(); - void set_key(std::string const& comp_key); + // Set a new key for different comparisons and /put/get/delete requests. + void reset_key(std::string const& newkey); void init_compare(CompareResult, CompareTarget); void init_compare(std::string const &old_value, CompareResult, CompareTarget); diff --git a/src/v3/Transaction.cpp b/src/v3/Transaction.cpp index 7dbc8b8..7596708 100644 --- a/src/v3/Transaction.cpp +++ b/src/v3/Transaction.cpp @@ -32,8 +32,8 @@ etcdv3::Transaction::Transaction(const std::string& key) : key(key) { txn_request.reset(new etcdserverpb::TxnRequest{}); } -void etcdv3::set_key(std::string const& comp_key) { - key = comp_key; +void etcdv3::Transaction::reset_key(std::string const& newkey) { + key = newkey; } void etcdv3::Transaction::init_compare(CompareResult result, CompareTarget target){