Big optimizations and securing code.
[genetic.git] / include / fitness / wsti.h
index 408cfada3e8f0f60ff75fc50e6c7abbc3bd1957a..e33aa798c316b3c94483dbf208ec6c6639fff9dd 100644 (file)
@@ -64,7 +64,7 @@ namespace genetic {
          *
          * @param _chromosome Chromosome, for which value will be calculated
          */
-        WSTI(_Chromosome& _chromosome)
+        WSTI(const _Chromosome& _chromosome)
             : Fitness<_Chromosome>(_chromosome) {
         }
 
@@ -85,7 +85,7 @@ namespace genetic {
          * @param start begining of the Fitness function domain
          * @param end end of the Fitness function domain
          */
-        WSTI(_Chromosome& _chromosome, float start, float end)
+        WSTI(const _Chromosome& _chromosome, float start, float end)
             : Fitness<_Chromosome>(_chromosome), span_start(start), span_end(end) {
         }
 
@@ -100,7 +100,7 @@ namespace genetic {
          * @param args map containing span_start and span_end as a keys and
          *      their values (_double_) passed as strings
          */
-        virtual void parseArguments(std::map<string, string> args) {
+        virtual void parseArguments(std::map<string, string>& args) {
             std::map<string, string>::iterator it;
             for (it = args.begin(); it != args.end(); it++) {
                 if (it->first == "span_start") {