Skip to content

Commit

Permalink
Typo
Browse files Browse the repository at this point in the history
  • Loading branch information
erlingrj committed Dec 8, 2024
1 parent 714c00c commit 0f26b2e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class UcPortGenerator(private val reactor: Reactor, private val connections: UcC

private fun generateSelfStruct(input: Input): String {
if (input.type.isArray) {
return "LF_DEFINE_INPUT_ARRAY_STRUCT(${reactor.codeType}, ${input.name}, ${reactor.getEffects(input).size}, ${reactor.getObservers(input).size}, ${input.type.id}, ${input.arrayLength}, ${connections.getNumConnectionsFromPort(null, input as Port)});"
return "LF_DEFINE_INPUT_ARRAY_STRUCT(${reactor.codeType}, ${input.name}, ${reactor.getEffects(input).size}, ${reactor.getObservers(input).size}, ${input.type.id}, ${input.type.arrayLength}, ${connections.getNumConnectionsFromPort(null, input as Port)});"
} else {
return "LF_DEFINE_INPUT_STRUCT(${reactor.codeType}, ${input.name}, ${reactor.getEffects(input).size}, ${reactor.getObservers(input).size}, ${input.type.toText()}, ${connections.getNumConnectionsFromPort(null, input as Port)});"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import org.lflang.toText
class UcStateGenerator(private val reactor: Reactor) {
fun generateReactorStructFields() =
reactor.allStateVars.joinToString(prefix = "// State variables \n", separator = "\n") {
if (it.isArray) {
"${it.type.id} ${it.name}[${it.arrayLength}];"
if (it.type.isArray) {
"${it.type.id} ${it.name}[${it.type.arrayLength}];"
} else {
"${it.type.toText()} ${it.name};"
}
Expand Down

0 comments on commit 0f26b2e

Please sign in to comment.