Commit 442426b4 authored by Vedran Miletić's avatar Vedran Miletić

Add return statements in functions returning non-void

parent bc33ca3e
......@@ -63,6 +63,7 @@ RbtGPChromosome &RbtGPChromosome::operator=(const RbtGPChromosome &c) {
nProgramInputs = c.nProgramInputs;
nFunctionsInputs = c.nFunctionsInputs;
nProgramOutputs = c.nProgramOutputs;
return *this;
}
std::istream &operator>>(std::istream &s, RbtGPChromosome &p) {
......@@ -74,6 +75,7 @@ std::istream &operator>>(std::istream &s, RbtGPChromosome &p) {
s >> cell >> value;
p.Cells(cell)->SetConstant(value);
}
return s;
}
std::ostream &RbtGPChromosome::Print(std::ostream &s) const {
......
......@@ -36,6 +36,7 @@ RbtGPFitnessFunction::operator=(const RbtGPFitnessFunction &g) {
objective = g.objective;
fitness = g.fitness;
}
return *this;
}
///////////////////
......
......@@ -68,6 +68,7 @@ RbtGPGenome &RbtGPGenome::operator=(const RbtGPGenome &g) {
*chrom = *(g.chrom);
fitness = g.fitness;
}
return *this;
}
///////////////////
......
......@@ -181,6 +181,8 @@ double RbtStringContext::Get(RbtModelPtr lig, std::string name) {
return negChg;
if (name == "LIG_TOT_CHG")
return (posChg + negChg);
// FIXME: throw an exception here so this is never reached
return 0.0;
}
double RbtStringContext::Get(RbtModelPtr spReceptor,
......@@ -264,6 +266,8 @@ double RbtStringContext::Get(RbtModelPtr spReceptor,
return negChg;
if (name == "SITE_TOT_CHG")
return (posChg + negChg);
// FIXME: throw an exception here so this is never reached
return 0.0;
}
double RbtStringContext::Get(RbtBaseSF *spSF, std::string name,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment