summaryrefslogtreecommitdiff
path: root/src/Piece.cc
diff options
context:
space:
mode:
authorNils Maier <maierman@web.de>2013-08-20 18:57:17 +0200
committerNils Maier <maierman@web.de>2013-08-20 21:28:24 +0200
commitd8f44ef4f6c5ad86b08658ecba41a84b775b6e69 (patch)
treed149687d1dc46fbd641735d71551e5990080e1fb /src/Piece.cc
parent9da17424c62ebabf7c407695e6990cdd9820ebc9 (diff)
Convert most 0/NULL pointers to nullptr
Courtesy of llvm cpp11-migrate 3.3
Diffstat (limited to 'src/Piece.cc')
-rw-r--r--src/Piece.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Piece.cc b/src/Piece.cc
index 24e5beff..4c779626 100644
--- a/src/Piece.cc
+++ b/src/Piece.cc
@@ -52,8 +52,8 @@
namespace aria2 {
-Piece::Piece():index_(0), length_(0), blockLength_(BLOCK_LENGTH), bitfield_(0),
- usedBySegment_(false), wrCache_(0)
+Piece::Piece():index_(0), length_(0), blockLength_(BLOCK_LENGTH), bitfield_(nullptr),
+ usedBySegment_(false), wrCache_(nullptr)
#ifdef ENABLE_MESSAGE_DIGEST
, nextBegin_(0)
#endif // ENABLE_MESSAGE_DIGEST
@@ -64,7 +64,7 @@ Piece::Piece(size_t index, int32_t length, int32_t blockLength)
length_(length),
blockLength_(blockLength),
bitfield_(new BitfieldMan(blockLength_, length)),
- usedBySegment_(false), wrCache_(0)
+ usedBySegment_(false), wrCache_(nullptr)
#ifdef ENABLE_MESSAGE_DIGEST
,nextBegin_(0)
#endif // ENABLE_MESSAGE_DIGEST
@@ -325,7 +325,7 @@ void Piece::initWrCache(WrDiskCache* diskCache,
if(!diskCache) {
return;
}
- assert(wrCache_ == 0);
+ assert(wrCache_ == nullptr);
wrCache_ = new WrDiskCacheEntry(diskAdaptor);
bool rv = diskCache->add(wrCache_);
assert(rv);
@@ -396,7 +396,7 @@ void Piece::releaseWrCache(WrDiskCache* diskCache)
if(diskCache && wrCache_) {
diskCache->remove(wrCache_);
delete wrCache_;
- wrCache_ = 0;
+ wrCache_ = nullptr;
}
}