Skip to content

Commit

Permalink
Removed redundant null checks in generated static functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
clnhlzmn committed Apr 6, 2021
1 parent bfbb885 commit 2543b5e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class CodeGenerator(val machine: Machine,
println()
for (activeAtomicState in machine.states.filter { it.isAtomic() }) {
println("static int ${machine.id}_${activeAtomicState.getFullyQualifiedIdString()}($machineStructName *self, $machineEventName *event) {")
println("\tif (!self || !event) return -1;")
println("\t(void)self; (void)event;")
if (!activeAtomicState.final) {
val config = activeAtomicState.getStateConfiguration()
println("\tswitch (event->id) {")
Expand Down

0 comments on commit 2543b5e

Please sign in to comment.