aboutsummaryrefslogtreecommitdiff
path: root/system/lib/libcxx/future.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'system/lib/libcxx/future.cpp')
-rw-r--r--system/lib/libcxx/future.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/system/lib/libcxx/future.cpp b/system/lib/libcxx/future.cpp
index ff591105..7d9a5b5d 100644
--- a/system/lib/libcxx/future.cpp
+++ b/system/lib/libcxx/future.cpp
@@ -29,7 +29,7 @@ __future_error_category::name() const _NOEXCEPT
string
__future_error_category::message(int ev) const
{
- switch (ev)
+ switch (static_cast<future_errc>(ev))
{
case future_errc::broken_promise:
return string("The associated promise has been destructed prior "
@@ -47,7 +47,7 @@ __future_error_category::message(int ev) const
}
const error_category&
-future_category()
+future_category() _NOEXCEPT
{
static __future_error_category __f;
return __f;
@@ -78,8 +78,8 @@ __assoc_sub_state::set_value()
throw future_error(make_error_code(future_errc::promise_already_satisfied));
#endif
__state_ |= __constructed | ready;
- __lk.unlock();
__cv_.notify_all();
+ __lk.unlock();
}
void
@@ -152,9 +152,9 @@ __assoc_sub_state::__sub_wait(unique_lock<mutex>& __lk)
{
if (!__is_ready())
{
- if (__state_ & deferred)
+ if (__state_ & static_cast<unsigned>(deferred))
{
- __state_ &= ~deferred;
+ __state_ &= ~static_cast<unsigned>(deferred);
__lk.unlock();
__execute();
}