summaryrefslogtreecommitdiff
path: root/src/SingleFileDownloadContext.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2008-05-13 14:15:23 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2008-05-13 14:15:23 +0000
commit386d19693bc3b06bea14f8fa606f513b6fe1ac9d (patch)
tree0137a837f6ce609ac1319b859a5333e0753f7527 /src/SingleFileDownloadContext.h
parent9d03f0d2f747c7c66a64081a7cabcf4e02c11020 (diff)
2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Replaced "" with static const variable A2STR::NIL. Replaced string comparison against "" with std::string::empty(). Added PROTO_* to Request class and use them as a protocol string constant. Made "started", "stopped", "completed" static const variable in AnnounceList class.
Diffstat (limited to 'src/SingleFileDownloadContext.h')
-rw-r--r--src/SingleFileDownloadContext.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/SingleFileDownloadContext.h b/src/SingleFileDownloadContext.h
index 1964c65c..ec4e87db 100644
--- a/src/SingleFileDownloadContext.h
+++ b/src/SingleFileDownloadContext.h
@@ -36,6 +36,7 @@
#define _D_SINGLE_FILE_DOWNLOAD_CONTEXT_H_
#include "DownloadContext.h"
+#include "A2STR.h"
#include <string>
#include <deque>
@@ -70,7 +71,7 @@ public:
SingleFileDownloadContext(size_t pieceLength,
uint64_t totalLength,
const std::string& filename,
- const std::string& ufilename = "");
+ const std::string& ufilename = A2STR::NIL);
virtual ~SingleFileDownloadContext() {}
@@ -79,7 +80,7 @@ public:
if(index < _pieceHashes.size()) {
return _pieceHashes[index];
} else {
- return "";
+ return A2STR::NIL;
}
}