From 1b7c1982896dba1d38e1fe84ba9660996607f5f9 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Fri, 8 Feb 2008 15:53:45 +0000 Subject: 2008-02-08 Tatsuhiro Tsujikawa Removed "using namespace std;" from all sources. Appended std:: prefix to c++ standard classes. Included string.h where mem* function are used. --- src/ByteArrayDiskWriter.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/ByteArrayDiskWriter.h') diff --git a/src/ByteArrayDiskWriter.h b/src/ByteArrayDiskWriter.h index b63bdb4d..c5d24de5 100644 --- a/src/ByteArrayDiskWriter.h +++ b/src/ByteArrayDiskWriter.h @@ -38,22 +38,24 @@ #include "DiskWriter.h" #include +namespace aria2 { + class ByteArrayDiskWriter : public DiskWriter { private: - stringstream buf; + std::stringstream buf; void clear(); public: ByteArrayDiskWriter(); virtual ~ByteArrayDiskWriter(); - virtual void initAndOpenFile(const string& filename, int64_t totalLength = 0); + virtual void initAndOpenFile(const std::string& filename, int64_t totalLength = 0); - virtual void openFile(const string& filename, int64_t totalLength = 0); + virtual void openFile(const std::string& filename, int64_t totalLength = 0); virtual void closeFile(); - virtual void openExistingFile(const string& filename, int64_t totalLength = 0); + virtual void openExistingFile(const std::string& filename, int64_t totalLength = 0); virtual void writeData(const unsigned char* data, int32_t len, int64_t position); virtual int32_t readData(unsigned char* data, int32_t len, int64_t position); @@ -75,11 +77,14 @@ public: return false; } - void setString(const string& s) + void setString(const std::string& s) { buf.str(s); } }; typedef SharedHandle ByteArrayDiskWriterHandle; + +} // namespace aria2 + #endif // _D_BYTE_ARRAY_DISK_WRITER_H_ -- cgit