Changeset e4036a


Ignore:
Timestamp:
May 8, 2017, 1:51:21 PM (8 years ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
ForceAnnealing_goodresults, ForceAnnealing_tocheck
Children:
7f3f9c
Parents:
ce254c
git-author:
Frederik Heber <heber@…> (03/29/17 10:58:47)
git-committer:
Frederik Heber <frederik.heber@…> (05/08/17 13:51:21)
Message:

FIX: Parameter is now longer friend of class Value.

  • Parameter does not need direct access to member variables of Value and this causes problems when value is not the same class as the template class of Parameter.
Location:
src/Parameters
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/Parameters/Parameter_impl.hpp

    rce254c re4036a  
    2323  value(instance.value.getValidator())
    2424{
    25   value.set(instance.value.value);
     25  value.set(instance.value.getUnvalidated());
    2626}
    2727
     
    258258  try {
    259259    status = status &&
    260         (value == _instance.value);
     260        (getUnvalidated() == _instance.getUnvalidated());
    261261    status = status && (ParameterInterface::getName() == _instance.ParameterInterface::getName());
    262262  } catch(ParameterException &e) {
     
    276276  Parameter<T> *instance = new Parameter<T>(ParameterInterface::getName(), value.getValidator());
    277277  // do not use get, we do not check for validity here
    278   if (value.ValueSet)
    279     instance->set(value.value);
     278  if (value.isSet())
     279    instance->set(value.getUnvalidated());
    280280  return instance;
    281281}
  • src/Parameters/Value.hpp

    rce254c re4036a  
    6767  friend class ValueTest;
    6868  friend class ContinuousValueTest;
    69   friend class Parameter<T>;
     69//  friend class Parameter<T>;
    7070public:
    7171  Value();
Note: See TracChangeset for help on using the changeset viewer.