From: Klaus Kaempf Date: Thu, 16 Mar 2006 19:19:11 +0000 (+0000) Subject: use builtins when available X-Git-Tag: 6.6.0~4187 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=270547fb39a2ac788c33b189d61e68cfb0425f1e;p=platform%2Fupstream%2Flibzypp.git use builtins when available --- diff --git a/zypp/target/store/serialize.cc b/zypp/target/store/serialize.cc index 411e65437..f452b8867 100644 --- a/zypp/target/store/serialize.cc +++ b/zypp/target/store/serialize.cc @@ -329,24 +329,7 @@ std::string resolvableTypeToString( const Resolvable::constPtr &resolvable, bool std::string resolvableKindToString( const Resolvable::Kind &kind, bool plural) { - if ( kind == ResTraits::kind ) - return plural ? "packages" : "package"; - else if ( kind == ResTraits::kind ) - return plural ? "patches" : "patch"; - else if ( kind == ResTraits::kind ) - return plural ? "atoms" : "atom"; - else if ( kind == ResTraits::kind ) - return plural ? "messages" : "message"; - else if ( kind == ResTraits::kind ) - return plural ? "selections" : "selection"; - else if ( kind == ResTraits::kind ) - return plural ? "scripts" : "script"; - else if ( kind == ResTraits::kind ) - return plural ? "patterns" : "pattern"; - else if ( kind == ResTraits::kind ) - return plural ? "products" : "product"; - else - return "unknown"; + return kind.asString() + (plural?"s":""); } template<>