From a298b2f3ee8854e10ae92db8a76b2d205ddcda67 Mon Sep 17 00:00:00 2001 From: Michael Andres Date: Fri, 4 Apr 2008 20:11:12 +0000 Subject: [PATCH] Fixed IdStringType ctor calls --- zypp/Edition.h | 4 ++-- zypp/PackageKeyword.h | 4 ++-- zypp/sat/SolvAttr.cc | 1 + zypp/sat/SolvAttr.h | 6 ++++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/zypp/Edition.h b/zypp/Edition.h index c40a564..dec2bc7 100644 --- a/zypp/Edition.h +++ b/zypp/Edition.h @@ -77,8 +77,8 @@ namespace zypp Edition() {} /** Ctor taking edition as string. */ - explicit Edition( IdString::IdType id_r ) : _str( IdString(id_r).c_str() ) {} - explicit Edition( const IdString & idstr_r ) : _str( idstr_r.c_str() ) {} + explicit Edition( IdString::IdType id_r ) : _str( id_r ) {} + explicit Edition( const IdString & idstr_r ) : _str( idstr_r ) {} explicit Edition( const std::string & str_r ) : _str( str_r ) {} explicit Edition( const char * cstr_r ) : _str( cstr_r ) {} diff --git a/zypp/PackageKeyword.h b/zypp/PackageKeyword.h index 2c60e78..b46eead 100644 --- a/zypp/PackageKeyword.h +++ b/zypp/PackageKeyword.h @@ -32,8 +32,8 @@ namespace zypp PackageKeyword() {} /** Ctor taking keyword as string. */ - explicit PackageKeyword( sat::detail::IdType id_r ) : _str( IdString(id_r).c_str() ) {} - explicit PackageKeyword( const IdString & idstr_r ) : _str( idstr_r.c_str() ) {} + explicit PackageKeyword( sat::detail::IdType id_r ) : _str( id_r ) {} + explicit PackageKeyword( const IdString & idstr_r ) : _str( idstr_r ) {} explicit PackageKeyword( const std::string & str_r ) : _str( str_r ) {} explicit PackageKeyword( const char * cstr_r ) : _str( cstr_r ) {} diff --git a/zypp/sat/SolvAttr.cc b/zypp/sat/SolvAttr.cc index dd106ec..45a7de9 100644 --- a/zypp/sat/SolvAttr.cc +++ b/zypp/sat/SolvAttr.cc @@ -27,6 +27,7 @@ namespace zypp namespace sat { ///////////////////////////////////////////////////////////////// + const SolvAttr SolvAttr::allAttr( detail::noId ); const SolvAttr SolvAttr::noAttr; #warning STILL ATTRIBUTES HERE WHICH ARE NOT PROVIDED BY SOLV FILES diff --git a/zypp/sat/SolvAttr.h b/zypp/sat/SolvAttr.h index 13d8e88..86da902 100644 --- a/zypp/sat/SolvAttr.h +++ b/zypp/sat/SolvAttr.h @@ -36,6 +36,8 @@ namespace sat public: /** \name Some builtin SolvAttr constants. */ //@{ + /** Value to request searching all Attributes (0). */ + static const SolvAttr allAttr; /** Value representing \c noAttr ("")*/ static const SolvAttr noAttr; @@ -91,8 +93,8 @@ namespace sat SolvAttr() {} /** Ctor taking kind as string. */ - explicit SolvAttr( sat::detail::IdType id_r ) : _str( IdString(id_r).c_str() ) {} - explicit SolvAttr( const IdString & idstr_r ) : _str( idstr_r.c_str() ) {} + explicit SolvAttr( sat::detail::IdType id_r ) : _str( id_r ) {} + explicit SolvAttr( const IdString & idstr_r ) : _str( idstr_r ) {} explicit SolvAttr( const std::string & str_r ) : _str( str_r ) {} explicit SolvAttr( const char * cstr_r ) : _str( cstr_r ) {} -- 2.7.4