Commit d2423e00 authored by neverlord's avatar neverlord

maintenance

parent c1f41337
......@@ -59,7 +59,7 @@ class is_stl_compliant_list
// mutable pointer
C* mc,
// check if there's a 'void push_back()' that takes C::value_type
decltype(mc->push_back(typename C::value_type()))* = 0
decltype(mc->push_back(typename C::value_type()))* = nullptr
)
{
return true;
......@@ -93,7 +93,7 @@ class is_stl_compliant_map
return true;
}
static void cmp_help_fun(...) { }
static void cmp_help_fun(void*) { }
typedef decltype(cmp_help_fun(static_cast<T*>(nullptr))) result_type;
......
......@@ -35,7 +35,7 @@
namespace cppa { namespace detail {
enum class yield_state
enum class yield_state : int
{
// yield() wasn't called yet
invalid,
......
......@@ -58,7 +58,7 @@ class is_forward_iterator
return true;
}
static void sfinae_fun(...) { }
static void sfinae_fun(void*) { }
typedef decltype(sfinae_fun(static_cast<T*>(nullptr))) result_type;
......
......@@ -55,7 +55,7 @@ class is_iterable
}
// SFNINAE default
static void sfinae_fun(...) { }
static void sfinae_fun(void const*) { }
typedef decltype(sfinae_fun(static_cast<T const*>(nullptr))) result_type;
......
......@@ -41,7 +41,7 @@
namespace cppa { namespace detail {
std::string demangle(const char* decorated)
std::string demangle(char const* decorated)
{
size_t size;
int status;
......@@ -54,7 +54,7 @@ std::string demangle(const char* decorated)
}
std::string result; // the undecorated typeid name
result.reserve(size);
const char* cstr = undecorated;
char const* cstr = undecorated;
// filter unnecessary characters from undecorated
char c = *cstr;
while (c != '\0')
......
......@@ -36,9 +36,9 @@ namespace {
using namespace cppa;
__thread detail::yield_state* t_ystate = nullptr;
__thread util::fiber* t_caller = nullptr;
__thread util::fiber* t_callee = nullptr;
__thread detail::yield_state t_ystate = detail::yield_state::invalid;
} // namespace <anonymous>
......@@ -46,17 +46,18 @@ namespace cppa { namespace detail {
void yield(yield_state ystate)
{
t_ystate = ystate;
*t_ystate = ystate;
util::fiber::swap(*t_callee, *t_caller);
}
yield_state call(util::fiber* what, util::fiber* from)
{
t_ystate = yield_state::invalid;
yield_state result;
t_ystate = &result;
t_caller = from;
t_callee = what;
util::fiber::swap(*from, *what);
return t_ystate;
return result;
}
} } // namespace cppa::detail
......@@ -133,7 +133,6 @@ void yielding_actor::dequeue(timed_invoke_rules& rules)
void yielding_actor::resume(util::fiber* from, resume_callback* callback)
{
self.set(this);
//set_self(this);
for (;;)
{
switch (call(&m_fiber, from))
......
......@@ -66,4 +66,8 @@ size_t test__primitive_variant();
void test__queue_performance();
using std::cout;
using std::endl;
using std::cerr;
#endif // TEST_HPP
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment