input/InputStream: allow emplacing the URI
This commit is contained in:
parent
cd2aaac0c2
commit
5ca74acd8d
|
@ -33,10 +33,11 @@ class FailingInputStream final : public InputStream {
|
|||
const std::exception_ptr error;
|
||||
|
||||
public:
|
||||
explicit FailingInputStream(const char *_uri,
|
||||
template<typename U>
|
||||
explicit FailingInputStream(U &&_uri,
|
||||
const std::exception_ptr _error,
|
||||
Mutex &_mutex) noexcept
|
||||
:InputStream(_uri, _mutex), error(_error) {
|
||||
:InputStream(std::forward<U>(_uri), _mutex), error(_error) {
|
||||
SetReady();
|
||||
}
|
||||
|
||||
|
|
|
@ -94,10 +94,11 @@ private:
|
|||
std::string mime;
|
||||
|
||||
public:
|
||||
InputStream(const char *_uri, Mutex &_mutex) noexcept
|
||||
:uri(_uri),
|
||||
mutex(_mutex) {
|
||||
assert(_uri != nullptr);
|
||||
template<typename U>
|
||||
InputStream(U &&_uri, Mutex &_mutex) noexcept
|
||||
:uri(std::forward<U>(_uri)),
|
||||
mutex(_mutex)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue