Code cleanup

pull/28/head
Tatsuhiro Tsujikawa 2012-09-25 23:48:35 +09:00
parent f133091a9e
commit c522d79d89
2 changed files with 2 additions and 8 deletions

View File

@ -63,9 +63,6 @@
namespace aria2 { namespace aria2 {
const std::string DefaultBtProgressInfoFile::V0000("0000");
const std::string DefaultBtProgressInfoFile::V0001("0001");
namespace { namespace {
std::string createFilename std::string createFilename
(const SharedHandle<DownloadContext>& dctx, const std::string& suffix) (const SharedHandle<DownloadContext>& dctx, const std::string& suffix)
@ -220,9 +217,9 @@ void DefaultBtProgressInfoFile::load()
READ_CHECK(fp, versionBuf, sizeof(versionBuf)); READ_CHECK(fp, versionBuf, sizeof(versionBuf));
std::string versionHex = util::toHex(versionBuf, sizeof(versionBuf)); std::string versionHex = util::toHex(versionBuf, sizeof(versionBuf));
int version; int version;
if(DefaultBtProgressInfoFile::V0000 == versionHex) { if("0000" == versionHex) {
version = 0; version = 0;
} else if(DefaultBtProgressInfoFile::V0001 == versionHex) { } else if("0001" == versionHex) {
version = 1; version = 1;
} else { } else {
throw DL_ABORT_EX throw DL_ABORT_EX

View File

@ -57,9 +57,6 @@ private:
std::string filename_; std::string filename_;
bool isTorrentDownload(); bool isTorrentDownload();
static const std::string V0000;
static const std::string V0001;
public: public:
DefaultBtProgressInfoFile(const SharedHandle<DownloadContext>& btContext, DefaultBtProgressInfoFile(const SharedHandle<DownloadContext>& btContext,
const SharedHandle<PieceStorage>& pieceStorage, const SharedHandle<PieceStorage>& pieceStorage,