mirror of https://github.com/aria2/aria2
Use nullptr for std::shared_ptr and unique_ptr default parameter
parent
5ba7150333
commit
b6d84c0160
|
@ -238,9 +238,8 @@ public:
|
|||
(cuid_t cuid, const std::shared_ptr<Request>& req,
|
||||
const std::shared_ptr<FileEntry>& fileEntry,
|
||||
RequestGroup* requestGroup, DownloadEngine* e,
|
||||
const std::shared_ptr<SocketCore>& s = std::shared_ptr<SocketCore>(),
|
||||
const std::shared_ptr<SocketRecvBuffer>& socketRecvBuffer
|
||||
= std::shared_ptr<SocketRecvBuffer>(),
|
||||
const std::shared_ptr<SocketCore>& s = nullptr,
|
||||
const std::shared_ptr<SocketRecvBuffer>& socketRecvBuffer = nullptr,
|
||||
bool incNumConnection = true);
|
||||
|
||||
virtual ~AbstractCommand();
|
||||
|
|
|
@ -47,7 +47,7 @@ private:
|
|||
size_t bytesProcessed_;
|
||||
public:
|
||||
ChunkedDecodingStreamFilter
|
||||
(std::unique_ptr<StreamFilter> delegate = std::unique_ptr<StreamFilter>{});
|
||||
(std::unique_ptr<StreamFilter> delegate = nullptr);
|
||||
|
||||
virtual ~ChunkedDecodingStreamFilter();
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ private:
|
|||
static const size_t OUTBUF_LENGTH = 16*1024;
|
||||
public:
|
||||
GZipDecodingStreamFilter
|
||||
(std::unique_ptr<StreamFilter> delegate = std::unique_ptr<StreamFilter>{});
|
||||
(std::unique_ptr<StreamFilter> delegate = nullptr);
|
||||
|
||||
virtual ~GZipDecodingStreamFilter();
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ namespace aria2 {
|
|||
namespace {
|
||||
std::unique_ptr<StreamFilter> getTransferEncodingStreamFilter
|
||||
(HttpResponse* httpResponse,
|
||||
std::unique_ptr<StreamFilter> delegate = std::unique_ptr<StreamFilter>{})
|
||||
std::unique_ptr<StreamFilter> delegate = nullptr)
|
||||
{
|
||||
if(httpResponse->isTransferEncodingSpecified()) {
|
||||
auto filter = httpResponse->getTransferEncodingStreamFilter();
|
||||
|
@ -106,7 +106,7 @@ std::unique_ptr<StreamFilter> getTransferEncodingStreamFilter
|
|||
namespace {
|
||||
std::unique_ptr<StreamFilter> getContentEncodingStreamFilter
|
||||
(HttpResponse* httpResponse,
|
||||
std::unique_ptr<StreamFilter> delegate = std::unique_ptr<StreamFilter>{})
|
||||
std::unique_ptr<StreamFilter> delegate = nullptr)
|
||||
{
|
||||
if(httpResponse->isContentEncodingSpecified()) {
|
||||
auto filter = httpResponse->getContentEncodingStreamFilter();
|
||||
|
|
|
@ -45,7 +45,7 @@ namespace aria2 {
|
|||
class RequestSlot {
|
||||
public:
|
||||
RequestSlot(size_t index, int32_t begin, int32_t length, size_t blockIndex,
|
||||
const std::shared_ptr<Piece>& piece = std::shared_ptr<Piece>())
|
||||
const std::shared_ptr<Piece>& piece = nullptr)
|
||||
: dispatchedTime_(global::wallclock()),
|
||||
index_(index), begin_(begin), length_(length), blockIndex_(blockIndex),
|
||||
piece_(piece)
|
||||
|
|
|
@ -50,8 +50,7 @@ class StreamFilter {
|
|||
private:
|
||||
std::unique_ptr<StreamFilter> delegate_;
|
||||
public:
|
||||
StreamFilter
|
||||
(std::unique_ptr<StreamFilter> delegate = std::unique_ptr<StreamFilter>{});
|
||||
StreamFilter(std::unique_ptr<StreamFilter> delegate = nullptr);
|
||||
|
||||
virtual ~StreamFilter();
|
||||
|
||||
|
|
Loading…
Reference in New Issue