Fix Copy constructor.
[genetic.git] / src / fitness / wsti.h
index 068590d94c815868b0d2bf6c04401932a47ef566..028c32220098425fd836d1c18580845501aad136 100644 (file)
@@ -34,10 +34,8 @@ namespace genetic {
             return span_start + (span_end - span_start) * this->fenotype() / power2N;
         }
     public:
-        WSTI(_Chromosome& chromosome, float start, float end) {
-            this->chromosome = chromosome;
-            this->span_start = start;
-            this->span_end = end;
+        WSTI(_Chromosome& _chromosome, float start, float end)
+            : chromosome(_chromosome.get()), span_start(start), span_end(end) {
         }
 
         double calculate() {