Mailinglist Archive: zypp-commit (233 mails)

< Previous Next >
[zypp-commit] <libzypp> master : Need an explicit str::asString( const char * t )
  • From: Michael Andres <ma@xxxxxxx>
  • Date: Tue, 3 Nov 2009 12:37:57 +0100
  • Message-id: <E1N5ctR-0007PD-7a@xxxxxxxxxxxxxxxx>
ref: refs/heads/master
commit 126df0bd7bbf29d3907f2f9b4879676237d0069d
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