toctave

t(iny)octave
git clone https://0xff.ir/g/toctave.git
Log | Files | Refs | README

commit 7bb3f81f6982770828d759bff844591f03101edf
parent 6a2c06809cb7539ff055eb62cd168fa4b3119ede
Author: Mohammad-Reza Nabipoor <mnabipoor@gnu.org>
Date:   Sat, 28 May 2022 23:44:56 +0430

cgen.cpp: Remove unnecessary lambdas

Diffstat:
Mcgen.cpp | 12+++---------
1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/cgen.cpp b/cgen.cpp @@ -115,12 +115,8 @@ sexpr(ast::NodesIter first, ast::NodesIter last) //--- Jittery VM JExecRoutine::JExecRoutine(struct toctave_mutable_routine* r) - : er(toctave_make_executable_routine(r), - [](struct toctave_executable_routine* p) { - toctave_destroy_executable_routine(p); - }) - , state(toctave_state_make(), - [](struct toctave_state* s) { toctave_state_destroy(s); }) + : er(toctave_make_executable_routine(r), toctave_destroy_executable_routine) + , state(toctave_state_make(), toctave_state_destroy) {} void @@ -153,9 +149,7 @@ JExecRoutine::result() //--- JRoutine::JRoutine() - : r(toctave_make_mutable_routine(), [](struct toctave_mutable_routine* p) { - toctave_destroy_mutable_routine(p); - }) + : r(toctave_make_mutable_routine(), toctave_destroy_mutable_routine) {} JExecRoutine