Skip to content

Commit

Permalink
mod: fix macos compilation error
Browse files Browse the repository at this point in the history
  • Loading branch information
quesnel committed Apr 22, 2024
1 parent 25559c2 commit 6075232
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions lib/include/irritator/modeling.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,12 +289,29 @@ class generic_component
const connection_limiter connection_limit) noexcept;

struct input_connection {
input_connection(const port_id x_,
const child_id dst_,
const connection::port port_) noexcept
: x(x_)
, dst(dst_)
, port(port_)
{}

port_id x; // The port_id in this component.
child_id dst;
connection::port port;
};

struct output_connection {
output_connection(port_id y_,
child_id src_,
connection::port port_) noexcept

: y(y_)
, src(src_)
, port(port_)
{}

port_id y; // The port_id in this component.
child_id src;
connection::port port;
Expand Down Expand Up @@ -451,13 +468,27 @@ struct grid_component {
}

struct input_connection {
input_connection(port_id x_, i32 row_, i32 col_, port_id id_) noexcept
: x(x_)
, row(row_)
, col(col_)
, id(id_)
{}

port_id x; // The port_id in this component.
i32 row; // The row in children vector.
i32 col; // The col in children vector.
port_id id; // The port_id of the @c children[idx].
};

struct output_connection {
output_connection(port_id y_, i32 row_, i32 col_, port_id id_) noexcept
: y(y_)
, row(row_)
, col(col_)
, id(id_)
{}

port_id y; // The port_id in this component.
i32 row; // The row in children vector.
i32 col; // The col in children vector.
Expand Down Expand Up @@ -522,12 +553,24 @@ class graph_component
enum class graph_type { dot_file, scale_free, small_world };

struct input_connection {
input_connection(port_id x_, vertex_id v_, port_id id_) noexcept
: x(x_)
, v(v_)
, id(id_)
{}

port_id x; // The port_id in this component.
vertex_id v; // The index in children vector.
port_id id; // The port_id of the @c children[idx].
};

struct output_connection {
output_connection(port_id y_, vertex_id v_, port_id id_) noexcept
: y(y_)
, v(v_)
, id(id_)
{}

port_id y; // The port_id in this component.
vertex_id v; // The index in children vector.
port_id id; // The port_id of the @c children[idx].
Expand Down

0 comments on commit 6075232

Please sign in to comment.