From 9e56de7a74f4b29075f09dfd42c42f6d14a094ca Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Fri, 22 Feb 2013 14:27:27 +0100 Subject: [PATCH] Makes MOEO::objectiveVector(int) const Const correctness demands that read-only accessors are made const, or this could discards qualifiers. --- moeo/src/core/MOEO.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moeo/src/core/MOEO.h b/moeo/src/core/MOEO.h index 8b03c1bab..1a9e1b118 100644 --- a/moeo/src/core/MOEO.h +++ b/moeo/src/core/MOEO.h @@ -155,7 +155,7 @@ class MOEO : public EO < MOEOObjectiveVector > * Gets one dimension of the objective vector * @param _dim dimension of the objective vector to set */ - typename ObjectiveVector::Type objectiveVector(unsigned int _dim) + typename ObjectiveVector::Type objectiveVector(unsigned int _dim) const { return objectiveVectorValue[_dim]; }