dlugolecki.net.pl
Dziennik
Polecane
Software
projects
/
genetic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Apply small optimizations.
[genetic.git]
/
src
/
gene.h
diff --git
a/src/gene.h
b/src/gene.h
index f3b3c55fa1846ae6efc45c339724afd8d4421e20..781cd3e29d67978dc2b27e965746a1fe53a6f645 100644
(file)
--- a/
src/gene.h
+++ b/
src/gene.h
@@
-15,6
+15,8
@@
namespace genetic {
* with additional changes complex struct.
*/
Type value;
* with additional changes complex struct.
*/
Type value;
+
+ template<typename> friend class Gene;
public:
/**
* Default constructor
public:
/**
* Default constructor
@@
-29,7
+31,7
@@
namespace genetic {
}
/** Copy constructor */
}
/** Copy constructor */
- Gene(const Gene& gene) : value(gene.
get()
) {}
+ Gene(const Gene& gene) : value(gene.
value
) {}
/**
* Copy operator.
/**
* Copy operator.
@@
-38,7
+40,7
@@
namespace genetic {
* @return Gene instance containing copied value
*/
Gene& operator=(const Gene& gene) {
* @return Gene instance containing copied value
*/
Gene& operator=(const Gene& gene) {
- this->value = gene.
get()
;
+ this->value = gene.
value
;
return *this;
}
return *this;
}