mirror of https://github.com/aria2/aria2
Pass std::unique_ptr by value
parent
23086b6e21
commit
28c84148e4
|
@ -150,7 +150,7 @@ void DownloadContext::setFileFilter(SegList<int>& sgl)
|
|||
}
|
||||
|
||||
void DownloadContext::setAttribute
|
||||
(ContextAttributeType key, std::unique_ptr<ContextAttribute>&& value)
|
||||
(ContextAttributeType key, std::unique_ptr<ContextAttribute> value)
|
||||
{
|
||||
assert(key < MAX_CTX_ATTR);
|
||||
attrs_[key] = std::move(value);
|
||||
|
|
|
@ -204,7 +204,7 @@ public:
|
|||
}
|
||||
|
||||
void setAttribute
|
||||
(ContextAttributeType key, std::unique_ptr<ContextAttribute>&& value);
|
||||
(ContextAttributeType key, std::unique_ptr<ContextAttribute> value);
|
||||
|
||||
ContextAttribute* getAttribute(ContextAttributeType key);
|
||||
|
||||
|
|
|
@ -394,7 +394,7 @@ ParameterOptionHandler::ParameterOptionHandler
|
|||
(const Pref* pref,
|
||||
const char* description,
|
||||
const std::string& defaultValue,
|
||||
std::vector<std::string>&& validParamValues,
|
||||
std::vector<std::string> validParamValues,
|
||||
char shortName)
|
||||
: AbstractOptionHandler(pref, description, defaultValue,
|
||||
OptionHandler::REQ_ARG, shortName),
|
||||
|
|
|
@ -181,7 +181,7 @@ public:
|
|||
ParameterOptionHandler(const Pref* pref,
|
||||
const char* description,
|
||||
const std::string& defaultValue,
|
||||
std::vector<std::string>&& validParamValues,
|
||||
std::vector<std::string> validParamValues,
|
||||
char shortName = 0);
|
||||
virtual ~ParameterOptionHandler();
|
||||
virtual void parseArg(Option& option, const std::string& optarg) const;
|
||||
|
|
|
@ -55,7 +55,7 @@ public:
|
|||
return instance_.get();
|
||||
}
|
||||
|
||||
static void instance(std::unique_ptr<T>&& ptr)
|
||||
static void instance(std::unique_ptr<T> ptr)
|
||||
{
|
||||
instance_ = std::move(ptr);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue