From 0dbd630bd653bbcc0eeac4ce63f17cf0067dbb1f Mon Sep 17 00:00:00 2001
From: Ludovic Apvrille <ludovic.apvrille@telecom-paris.fr>
Date: Wed, 29 Nov 2023 14:42:56 +0100
Subject: [PATCH] Update on prameters

---
 simulators/c++2/src_simulator/app/Parameter.h         | 11 ++++++-----
 .../test/java/tmltranslator/TMLDeepCloneTests.java    |  3 ++-
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/simulators/c++2/src_simulator/app/Parameter.h b/simulators/c++2/src_simulator/app/Parameter.h
index f96df82e5d..e3c05b9343 100644
--- a/simulators/c++2/src_simulator/app/Parameter.h
+++ b/simulators/c++2/src_simulator/app/Parameter.h
@@ -84,11 +84,12 @@ public:
 //#endif
 	}
 			
-	SizedParameter(std::istream& s){
-//#if size>0
-		for (unsigned int i=0;i<size;i++){
-			READ_STREAM(s, _p[i]);
-		}
+  SizedParameter(std::istream& s){
+    //#if size>0
+    for (unsigned int i=0;i<size;){
+      READ_STREAM(s, _p[i]);
+      i++;
+    }
 #ifdef DEBUG_SERIALIZE
 		print();
 #endif
diff --git a/ttool/src/test/java/tmltranslator/TMLDeepCloneTests.java b/ttool/src/test/java/tmltranslator/TMLDeepCloneTests.java
index e19b110212..11a8b9475a 100644
--- a/ttool/src/test/java/tmltranslator/TMLDeepCloneTests.java
+++ b/ttool/src/test/java/tmltranslator/TMLDeepCloneTests.java
@@ -25,7 +25,7 @@ public class TMLDeepCloneTests extends AbstractTest {
 
 
     // Test true cases
-    @Test
+    @Test @SuppressWarnings("unchecked")
     public void testDeepCloneTMLApplication() {
         for(String fileName: TML_APP_FILES) {
             fileName = getBaseResourcesDir() + PATH_TO_TEST_CLONE_FILE + fileName;
@@ -68,6 +68,7 @@ public class TMLDeepCloneTests extends AbstractTest {
                 assertTrue(false);
             }
 
+
             tmltsw = new TMLTextSpecification("cloned");
             outputTML = tmltsw.toTextFormat(cloned);
 
-- 
GitLab