From 85cd3eab72cceb28894cdae0051697048f01d0a1 Mon Sep 17 00:00:00 2001 From: Michael Andres Date: Tue, 31 Jan 2006 08:44:58 +0000 Subject: [PATCH] - fixed Target ctor to be 'explicit'. The compiler should not be allowed to implicitly convert some type into a Target. --- zypp/Target.cc | 2 +- zypp/Target.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/zypp/Target.cc b/zypp/Target.cc index 3402bfd..1192d6d 100644 --- a/zypp/Target.cc +++ b/zypp/Target.cc @@ -30,8 +30,8 @@ namespace zypp // METHOD TYPE : Ctor // Target::Target( const Pathname & root ) + : _pimpl( new Impl(root) ) { - _pimpl = RW_pointer >(new Impl(root)); } /////////////////////////////////////////////////////////////////// diff --git a/zypp/Target.h b/zypp/Target.h index c0c65e9..288c24e 100644 --- a/zypp/Target.h +++ b/zypp/Target.h @@ -58,6 +58,7 @@ namespace zypp public: /** Ctor */ + explicit Target( const Pathname & root = "/" ); /** Ctor */ explicit -- 2.7.4