summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2021-09-21 01:02:11 +1000
committer Vas Crabb <vas@vastheman.com>2021-09-21 01:02:11 +1000
commitda1af2b0d6816a5da1544176b882407bd0dad2ee (patch)
tree9a7db16882a0fe937a1b2cbdcb6e78711f33dfa3 /src/emu
parent362d859dc15384f98b97d37cb5e21c7798df3cab (diff)
-delegates: Fixed structure return with MSVC C++ ABI.
* Automatically use delegate_mfp_compatible to generate an adaptor for member functions that return non-scalar, non-reference types (partially addresses #8597). * Enabled the MSVC delegate implemenation for MSVC on AArch64. * Switched back to neater delegate types for layout item bounds and colour. -docs: Updated the example layout links to point to 0.235 - this means there's now an example of embedded SVG.
Diffstat (limited to 'src/emu')
-rw-r--r--src/emu/rendlay.cpp8
-rw-r--r--src/emu/rendlay.h16
2 files changed, 12 insertions, 12 deletions
diff --git a/src/emu/rendlay.cpp b/src/emu/rendlay.cpp
index c3f7a70a2e8..b33c58e8fef 100644
--- a/src/emu/rendlay.cpp
+++ b/src/emu/rendlay.cpp
@@ -4823,10 +4823,10 @@ int layout_view::item::get_anim_input() const
// get_interpolated_bounds - animated bounds
//-------------------------------------------------
-void layout_view::item::get_interpolated_bounds(render_bounds &result) const
+render_bounds layout_view::item::get_interpolated_bounds() const
{
assert(m_bounds.size() > 1U);
- result = interpolate_bounds(m_bounds, m_get_anim_state());
+ return interpolate_bounds(m_bounds, m_get_anim_state());
}
@@ -4834,10 +4834,10 @@ void layout_view::item::get_interpolated_bounds(render_bounds &result) const
// get_interpolated_color - animated color
//-------------------------------------------------
-void layout_view::item::get_interpolated_color(render_color &result) const
+render_color layout_view::item::get_interpolated_color() const
{
assert(m_color.size() > 1U);
- result = interpolate_color(m_color, m_get_anim_state());
+ return interpolate_color(m_color, m_get_anim_state());
}
diff --git a/src/emu/rendlay.h b/src/emu/rendlay.h
index 5555af820ac..5b121d18880 100644
--- a/src/emu/rendlay.h
+++ b/src/emu/rendlay.h
@@ -25,7 +25,7 @@ namespace emu::render::detail {
struct bounds_step
{
- void get(render_bounds &result) const { result = bounds; }
+ render_bounds get() const { return bounds; }
int state;
render_bounds bounds;
@@ -35,7 +35,7 @@ using bounds_vector = std::vector<bounds_step>;
struct color_step
{
- void get(render_color &result) const { result = color; }
+ render_color get() const { return color; }
int state;
render_color color;
@@ -261,8 +261,8 @@ public:
public:
using state_delegate = delegate<int ()>;
- using bounds_delegate = delegate<void (render_bounds &)>;
- using color_delegate = delegate<void (render_color &)>;
+ using bounds_delegate = delegate<render_bounds ()>;
+ using color_delegate = delegate<render_color ()>;
// construction/destruction
item(
@@ -280,8 +280,8 @@ public:
screen_device *screen() const { return m_screen; }
bool bounds_animated() const { return m_bounds.size() > 1U; }
bool color_animated() const { return m_color.size() > 1U; }
- render_bounds bounds() const { render_bounds result; m_get_bounds(result); return result; }
- render_color color() const { render_color result; m_get_color(result); return result; }
+ render_bounds bounds() const { return m_get_bounds(); }
+ render_color color() const { return m_get_color(); }
int blend_mode() const { return m_blend_mode; }
u32 visibility_mask() const { return m_visibility_mask; }
int orientation() const { return m_orientation; }
@@ -323,8 +323,8 @@ public:
int get_input_field_conditional() const;
int get_anim_output() const;
int get_anim_input() const;
- void get_interpolated_bounds(render_bounds &result) const;
- void get_interpolated_color(render_color &result) const;
+ render_bounds get_interpolated_bounds() const;
+ render_color get_interpolated_color() const;
static layout_element *find_element(view_environment &env, util::xml::data_node const &itemnode, element_map &elemmap);
static bounds_vector make_bounds(view_environment &env, util::xml::data_node const &itemnode, layout_group::transform const &trans);