Skip to content

Commit

Permalink
Skip duplicate CGType indices in rtwsfcnfmi.tlc
Browse files Browse the repository at this point in the history
fixes #205
  • Loading branch information
t-sommer committed Aug 26, 2020
1 parent bdfaa78 commit f3e14a8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rtwsfcnfmi/rtwsfcnfmixml.tlc
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,18 @@
#include "model_interface.h"


%assign CGTypIndices = []

size_t getCGTypeSize(int typeIndex) {

switch (typeIndex) {
%foreach dataTypeIdx = DataTypes.NumDataTypes
%assign dataType = DataTypes.DataType[dataTypeIdx]
%if FEVAL("ismember", dataType.CGTypeIdx, CGTypIndices)
%continue
%endif
case %<dataType.CGTypeIdx>: return %<dataType.Size>; /* %<dataType.Name> */
%assign CGTypIndices = CGTypIndices + dataType.CGTypeIdx
%endforeach
default: return 0; /* unknown type */
}
Expand Down

0 comments on commit f3e14a8

Please sign in to comment.