Kaynağa Gözat

Ensured for-loops in init function enclose body in braces.

anyssen 9 yıl önce
ebeveyn
işleme
4ab2ff5c22

+ 4 - 2
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/StatemachineC.xtend

@@ -84,12 +84,14 @@ class StatemachineC {
 		{
 			int i;
 
-			for (i = 0; i < «type.toUpperCase»_MAX_ORTHOGONAL_STATES; ++i)
+			for (i = 0; i < «type.toUpperCase»_MAX_ORTHOGONAL_STATES; ++i) {
 				«scHandle»->stateConfVector[i] = «null_state»;
+			}
 			
 			«IF hasHistory»
-			for (i = 0; i < «type.toUpperCase»_MAX_HISTORY_STATES; ++i)
+			for (i = 0; i < «type.toUpperCase»_MAX_HISTORY_STATES; ++i) {
 				«scHandle»->historyVector[i] = «null_state»;
+			}
 			«ENDIF»
 			
 			«scHandle»->stateConfVectorPosition = 0;