summaryrefslogtreecommitdiff
path: root/src/Piece.h
diff options
context:
space:
mode:
authorNils Maier <maierman@web.de>2014-04-17 01:36:19 +0200
committerNils Maier <maierman@web.de>2014-04-17 18:02:42 +0200
commit010131161ebdea22e5b6eb4fd0740e8e6da3df67 (patch)
tree3a768bbd2796056c65de9630a6ab6946d4eda43f /src/Piece.h
parentbefd799d177c2860ea4e9c6cf8c744342c394427 (diff)
Remove ENABLE_MESSAGE_DIGEST, since we got the internal md, always
Diffstat (limited to 'src/Piece.h')
-rw-r--r--src/Piece.h15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/Piece.h b/src/Piece.h
index 40c62693..2389c3ac 100644
--- a/src/Piece.h
+++ b/src/Piece.h
@@ -50,32 +50,21 @@ class BitfieldMan;
class WrDiskCache;
class WrDiskCacheEntry;
class DiskAdaptor;
-
-#ifdef ENABLE_MESSAGE_DIGEST
-
class MessageDigest;
-#endif // ENABLE_MESSAGE_DIGEST
-
class Piece {
private:
BitfieldMan* bitfield_;
WrDiskCacheEntry* wrCache_;
-#ifdef ENABLE_MESSAGE_DIGEST
std::unique_ptr<MessageDigest> mdctx_;
-#endif // ENABLE_MESSAGE_DIGEST
std::vector<cuid_t> users_;
-#ifdef ENABLE_MESSAGE_DIGEST
std::string hashType_;
-#endif // ENABLE_MESSAGE_DIGEST
size_t index_;
int32_t length_;
int32_t blockLength_;
-#ifdef ENABLE_MESSAGE_DIGEST
int32_t nextBegin_;
-#endif // ENABLE_MESSAGE_DIGEST
bool usedBySegment_;
@@ -158,8 +147,6 @@ public:
// Calculates completed length
int32_t getCompletedLength();
-#ifdef ENABLE_MESSAGE_DIGEST
-
void setHashType(const std::string& hashType);
// Updates hash value. This function compares begin and private variable
@@ -181,8 +168,6 @@ public:
// cached data and data on disk.
std::string getDigestWithWrCache(size_t pieceLength,
const std::shared_ptr<DiskAdaptor>& adaptor);
-#endif // ENABLE_MESSAGE_DIGEST
-
/**
* Loses current bitfield state.
*/