From afa48866f971328acc31ac7773ffd46c0067639a Mon Sep 17 00:00:00 2001
From: "francois.grand" <francois.grand@irstea.fr>
Date: Wed, 7 Feb 2018 16:25:57 +0100
Subject: [PATCH] ticket #36 : simplification du constructeur CalcResult

---
 src/remous.ts      | 2 +-
 src/util/result.ts | 9 +--------
 2 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/src/remous.ts b/src/remous.ts
index 63346fb7..81ae8fd1 100644
--- a/src/remous.ts
+++ b/src/remous.ts
@@ -514,7 +514,7 @@ export class CourbeRemous extends Nub {
 		// "tRes": { [key: number]: number }
 		// }
 		CalcResult {
-		const res = new CalcResult(undefined);
+		const res = new CalcResult();
 
 		// let Yc: number = this.Sn.Calc("Yc");
 		const rYC = this.Sn.Calc("Yc");
diff --git a/src/util/result.ts b/src/util/result.ts
index 438e2620..ce641349 100644
--- a/src/util/result.ts
+++ b/src/util/result.ts
@@ -124,16 +124,9 @@ export class CalcResult {
 
     private _results: Result[];
 
-    constructor(v: number | Message | Result, d: {} = undefined) {
+    constructor() {
         this._globalLog = new cLog();
         this._results = [];
-        if (typeof (v) == "number" || v instanceof Message) {
-            const res = new Result(v, d);
-            this._results.push(res);
-        }
-        else if (v instanceof Result) {
-            this._results.push(v);
-        }
     }
 
     private get result(): Result {
-- 
GitLab