make in_queue int tptre
This commit is contained in:
@@ -1,16 +1,6 @@
|
||||
|
||||
local ffi = FFI
|
||||
|
||||
ffi.cdef[[
|
||||
struct Net {
|
||||
int in_queue;
|
||||
int num_out_ports_on;
|
||||
int state;
|
||||
int update_tick;
|
||||
struct Gate* gates_update[0];
|
||||
};
|
||||
]]
|
||||
|
||||
Group = {}
|
||||
|
||||
function Group.new()
|
||||
@@ -18,7 +8,7 @@ function Group.new()
|
||||
-- Logic Critical
|
||||
state = 0,
|
||||
state_num = 0,
|
||||
in_queue = 0,
|
||||
in_queue = ffi.new("int[1]"),
|
||||
gates_update = {},
|
||||
num_gates_update = 0,
|
||||
|
||||
@@ -195,7 +185,7 @@ function Group.setstate(group, state)
|
||||
local len = group.num_gates_update
|
||||
for i = 1, len do
|
||||
local gate = group.gates_update[i]
|
||||
if gate and gate.in_queue==0 then
|
||||
if gate and gate.in_queue[0]==0 then
|
||||
Simulation.queuegate(sim, gate)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user