mirror of https://github.com/aria2/aria2
Code cleanup
parent
f133091a9e
commit
c522d79d89
|
@ -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
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue