aboutsummaryrefslogtreecommitdiffstats
path: root/alv/base
diff options
context:
space:
mode:
authors-ol <s+removethis@s-ol.nu>2022-02-04 16:11:29 +0000
committers-ol <s+removethis@s-ol.nu>2025-03-02 14:24:49 +0000
commit6b2a58f017529b0491ce7b639974f549a4f14889 (patch)
tree126bada6853c060385a11d6c3b3bd557c322e8da /alv/base
parentadd Dummy AST node (diff)
downloadalive-6b2a58f017529b0491ce7b639974f549a4f14889.tar.gz
alive-6b2a58f017529b0491ce7b639974f549a4f14889.zip
lib: use Op:update_out
Diffstat (limited to 'alv/base')
-rw-r--r--alv/base/op.moon9
1 files changed, 3 insertions, 6 deletions
diff --git a/alv/base/op.moon b/alv/base/op.moon
index e751145..4153a52 100644
--- a/alv/base/op.moon
+++ b/alv/base/op.moon
@@ -170,16 +170,13 @@ class Op
-- @tparam Type type
-- @tparam[opt] any val initial value
update_out: (metatype, type, val) =>
- same_type = @out and @out.type == type
- if same_type and @out.metatype == metatype
+ if @out and @out.type == type and @out.metatype == metatype
-- we can just keep it. do nothing.
- return
-
- -- prefer last value if applicable
- val = same_type and @.out! or val
+ return false
ResultType = if metatype == '!' then EvtStream else SigStream
@out = ResultType type, val
+ true
--- `\unwrap` all `Input`s in `@inputs` and return a table with the same
-- shape.