0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 18:22:50 +01:00

ircd::ctx: Minor style/format fixes.

This commit is contained in:
Jason Volk 2017-12-18 15:06:14 -07:00
parent 82aa59c5ec
commit fbf07913f7
2 changed files with 18 additions and 18 deletions

View file

@ -116,26 +116,26 @@ noexcept
}
inline
ircd::ctx::future<void>::future():
st(nullptr)
ircd::ctx::future<void>::future()
:st{nullptr}
{
}
template<class T>
ircd::ctx::future<T>::future():
st(nullptr)
ircd::ctx::future<T>::future()
:st{nullptr}
{
}
inline
ircd::ctx::future<void>::future(promise<void> &promise):
st(promise.get_state().share())
ircd::ctx::future<void>::future(promise<void> &promise)
:st{promise.get_state().share()}
{
}
template<class T>
ircd::ctx::future<T>::future(promise<T> &promise):
st(promise.get_state().share())
ircd::ctx::future<T>::future(promise<T> &promise)
:st{promise.get_state().share()}
{
}

View file

@ -40,9 +40,9 @@ class ircd::ctx::promise
std::shared_ptr<shared_state<T>> st;
public:
using value_type = typename shared_state<T>::value_type;
using pointer_type = typename shared_state<T>::pointer_type;
using reference_type = typename shared_state<T>::reference_type;
using value_type = typename shared_state<T>::value_type;
using pointer_type = typename shared_state<T>::pointer_type;
using reference_type = typename shared_state<T>::reference_type;
bool valid() const { return bool(st); }
bool operator!() const { return !valid(); }
@ -70,7 +70,7 @@ class ircd::ctx::promise<void>
std::shared_ptr<shared_state<void>> st;
public:
using value_type = typename shared_state<void>::value_type;
using value_type = typename shared_state<void>::value_type;
bool valid() const { return bool(st); }
bool operator!() const { return !valid(); }
@ -90,21 +90,21 @@ class ircd::ctx::promise<void>
};
inline
ircd::ctx::promise<void>::promise():
st(std::make_shared<shared_state<void>>())
ircd::ctx::promise<void>::promise()
:st{std::make_shared<shared_state<void>>()}
{
}
template<class T>
ircd::ctx::promise<T>::promise():
st(std::make_shared<shared_state<T>>())
ircd::ctx::promise<T>::promise()
:st{std::make_shared<shared_state<T>>()}
{
}
template<class T>
ircd::ctx::promise<T>::promise(promise<T> &&o)
noexcept:
st(std::move(o.st))
noexcept
:st{std::move(o.st)}
{
}