From dd4cef478105389e9ccbad2c63f673794936de24 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Thu, 16 Apr 2015 10:32:40 +0300 Subject: [PATCH] dbms: fixed build [#METR-2944]. --- dbms/src/Server/Server.cpp | 2 +- libs/libzkutil/src/tests/zkutil_test_lock.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dbms/src/Server/Server.cpp b/dbms/src/Server/Server.cpp index 0df5f509085..91644d57ee0 100644 --- a/dbms/src/Server/Server.cpp +++ b/dbms/src/Server/Server.cpp @@ -470,7 +470,7 @@ int Server::main(const std::vector & args) bool has_zookeeper = false; if (config().has("zookeeper")) { - global_context->setZooKeeper(new zkutil::ZooKeeper(config(), "zookeeper")); + global_context->setZooKeeper(std::make_shared(config(), "zookeeper")); has_zookeeper = true; } diff --git a/libs/libzkutil/src/tests/zkutil_test_lock.cpp b/libs/libzkutil/src/tests/zkutil_test_lock.cpp index 82d2c6f2591..6acaeaac4a7 100644 --- a/libs/libzkutil/src/tests/zkutil_test_lock.cpp +++ b/libs/libzkutil/src/tests/zkutil_test_lock.cpp @@ -6,7 +6,7 @@ int main() try { - zkutil::Lock l(new zkutil::ZooKeeper("localhost:2181"), "/test", "test_lock"); + zkutil::Lock l(std::make_shared("localhost:2181"), "/test", "test_lock"); std::cout << "check " << l.check() << std::endl; std::cout << "lock tryLock() " << l.tryLock() << std::endl; std::cout << "check " << l.check() << std::endl;