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;
|
const std::exception_ptr error;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit FailingInputStream(const char *_uri,
|
template<typename U>
|
||||||
|
explicit FailingInputStream(U &&_uri,
|
||||||
const std::exception_ptr _error,
|
const std::exception_ptr _error,
|
||||||
Mutex &_mutex) noexcept
|
Mutex &_mutex) noexcept
|
||||||
:InputStream(_uri, _mutex), error(_error) {
|
:InputStream(std::forward<U>(_uri), _mutex), error(_error) {
|
||||||
SetReady();
|
SetReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -94,10 +94,11 @@ private:
|
||||||
std::string mime;
|
std::string mime;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
InputStream(const char *_uri, Mutex &_mutex) noexcept
|
template<typename U>
|
||||||
:uri(_uri),
|
InputStream(U &&_uri, Mutex &_mutex) noexcept
|
||||||
mutex(_mutex) {
|
:uri(std::forward<U>(_uri)),
|
||||||
assert(_uri != nullptr);
|
mutex(_mutex)
|
||||||
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue