From bc4d23883b360b5b9728cddd5bec9362ca46eb1e Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Sun, 26 Apr 2015 18:36:45 +0300 Subject: [PATCH] cql3: simplify ut_name constructor shared_ptr<> is already optional, so remove the outer optional<> wrapper. --- cql3/ut_name.hh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cql3/ut_name.hh b/cql3/ut_name.hh index e51ffa1548..20f8758990 100644 --- a/cql3/ut_name.hh +++ b/cql3/ut_name.hh @@ -34,11 +34,10 @@ namespace cql3 { class ut_name final { std::experimental::optional _ks_name; - const ::shared_ptr _ut_name; - + ::shared_ptr _ut_name; public: - ut_name(std::experimental::optional<::shared_ptr> ks_name, ::shared_ptr ut_name) - : _ks_name{!ks_name ? std::experimental::optional{} : std::experimental::optional{ks_name.value()->to_string()}} + ut_name(shared_ptr ks_name, ::shared_ptr ut_name) + : _ks_name{!ks_name ? std::experimental::optional{} : std::experimental::optional{ks_name->to_string()}} , _ut_name{ut_name} { }