From 694fb307aa7e582a55bce7e995bde3a4614b3b4f Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sat, 20 Nov 2010 09:36:14 +0000 Subject: 2010-11-20 Tatsuhiro Tsujikawa Replaced StringFormat with fmt --- src/StringFormat.cc | 68 ----------------------------------------------------- 1 file changed, 68 deletions(-) delete mode 100644 src/StringFormat.cc (limited to 'src/StringFormat.cc') diff --git a/src/StringFormat.cc b/src/StringFormat.cc deleted file mode 100644 index e5f5a943..00000000 --- a/src/StringFormat.cc +++ /dev/null @@ -1,68 +0,0 @@ -/* */ -#include "StringFormat.h" -#include -#include -#include -#include -#include - -namespace aria2 { - -StringFormat::StringFormat(const char* fmt, ...) -{ - va_list ap; - va_start(ap, fmt); - char buf[1024]; - if(vsnprintf(buf, sizeof(buf), fmt, ap) > 0) { - msg_ = buf; - } - va_end(ap); -} - -StringFormat::~StringFormat() {} - -const std::string& StringFormat::str() const -{ - return msg_; -} - -std::ostream& operator<<(std::ostream& o, const StringFormat& fmt) -{ - o << fmt.str(); - return o; -} - -} // namespace aria2 -- cgit