fix CI compilation errors

This commit is contained in:
2019-11-02 07:27:51 +07:00
parent eec94458c7
commit f1b62a55f1
6 changed files with 25 additions and 23 deletions

View File

@@ -79,11 +79,12 @@ namespace e2d::behaviours
behaviour.meta(),
std::forward<Args>(args)...);
if ( !r.valid() ) {
sol::error err = r;
the<debug>().error("BEHAVIOUR: Behaviour method error:\n"
"--> Method: %0\n"
"--> Error: %1",
method,
sol::error(r).what());
err.what());
return call_result::failed;
}

View File

@@ -13,6 +13,23 @@ namespace e2d
class gobject final {
public:
class state;
class destroying_state_ilist_tag;
using destroying_states = intrusive_list<
state,
destroying_state_ilist_tag>;
public:
class state
: private noncopyable
, public ref_counter<state>
, public intrusive_list_hook<destroying_state_ilist_tag> {
public:
virtual ~state() noexcept {}
virtual void destroy() noexcept = 0;
virtual bool destroyed() const noexcept = 0;
virtual bool invalided() const noexcept = 0;
virtual ecs::entity raw_entity() noexcept = 0;
virtual ecs::const_entity raw_entity() const noexcept = 0;
};
using state_iptr = intrusive_ptr<state>;
const state_iptr& internal_state() const noexcept;
public:
@@ -102,24 +119,6 @@ namespace e2d
namespace e2d
{
class gobject_destroying_state_ilist_tag;
using gobject_destroying_states = intrusive_list<
gobject::state,
gobject_destroying_state_ilist_tag>;
class gobject::state
: private noncopyable
, public ref_counter<state>
, public intrusive_list_hook<gobject_destroying_state_ilist_tag> {
public:
virtual ~state() noexcept {}
virtual void destroy() noexcept = 0;
virtual bool destroyed() const noexcept = 0;
virtual bool invalided() const noexcept = 0;
virtual ecs::entity raw_entity() noexcept = 0;
virtual ecs::const_entity raw_entity() const noexcept = 0;
};
template < typename T >
gcomponent<T> gobject::component() noexcept {
return gcomponent<T>(*this);

View File

@@ -35,6 +35,6 @@ namespace e2d
void finalize_instances() noexcept;
private:
ecs::registry registry_;
gobject_destroying_states destroying_states_;
gobject::destroying_states destroying_states_;
};
}

View File

@@ -158,7 +158,7 @@ namespace e2d
TRUE,
sound_data.data(),
0,
sound_data.size(),
math::numeric_cast<DWORD>(sound_data.size()),
max_sound_channels,
BASS_SAMPLE_OVER_POS);

View File

@@ -40,9 +40,10 @@ namespace e2d
sol::protected_function_result meta = script->content().call();
if ( !meta.valid() ) {
sol::error err = meta;
the<debug>().error("BEHAVIOUR: Behaviour script error:\n"
"--> Error: %0",
sol::error(meta).what());
err.what());
return false;
}

View File

@@ -40,9 +40,10 @@ namespace e2d
src.size());
if ( !result.valid() ) {
sol::error err = result;
the<debug>().error("LUASOL: Failed to load script buffer:\n"
"--> Info: %0",
sol::error(result).what());
err.what());
return std::nullopt;
}