Mailinglist Archive: zypp-commit (233 mails)

< Previous Next >
[zypp-commit] <libzypp> ma-misc : Need an explicit str::asString( const char * t )
  • From: Michael Andres <ma@xxxxxxx>
  • Date: Tue, 3 Nov 2009 11:34:50 +0100
  • Message-id: <E1N5GjC-0001c5-LF@xxxxxxxxxxxxxxxx>
ref: refs/heads/ma-misc
commit fb20dc64f647c37f2201e9c7821791dd7f6fa6b9
Author: Michael Andres <ma@xxxxxxx>
Date: Tue Nov 3 11:34:50 2009 +0100

Need an explicit str::asString( const char * t )
---
zypp/base/String.h | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/zypp/base/String.h b/zypp/base/String.h
index 2d4fbe5..bbd5db6 100644
--- a/zypp/base/String.h
+++ b/zypp/base/String.h
@@ -108,6 +108,12 @@ namespace zypp
/**
* Global asString() that works with std::string too
*/
+ inline std::string asString( const std::string &t )
+ { return t; }
+
+ inline std::string asString( const char * t )
+ { return t; }
+
template<class _T>
inline std::string asString( const _T &t )
{ return t.asString(); }
@@ -121,10 +127,6 @@ namespace zypp
{ return p->asString(); }

template<>
- inline std::string asString( const std::string &t )
- { return t; }
-
- template<>
inline std::string asString( const bool &t )
{ return t ? "+" : "-"; }

--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages