Skip to content
Snippets Groups Projects
Commit 10061f42 authored by Uwe Woessner's avatar Uwe Woessner
Browse files

classes with const members can't be copied, this does not compile when you put...

classes with const members can't be copied, this does not compile when you put them into a std container
parent 069c1a40
No related branches found
No related tags found
No related merge requests found
......@@ -78,7 +78,7 @@ public:
}
private:
const std::vector<std::string> triggeringEntityNames;
std::vector<std::string> triggeringEntityNames;
};
class OPENPASSCOMMONEXPORT TimeToCollisionCondition : public ByEntityCondition
......@@ -99,9 +99,9 @@ public:
AgentInterfaces IsMet(WorldInterface * const world) const;
private:
const std::string referenceEntityName;
const double targetTTC;
const Rule rule;
std::string referenceEntityName;
double targetTTC;
Rule rule;
};
class OPENPASSCOMMONEXPORT TimeHeadwayCondition : public ByEntityCondition
......@@ -124,10 +124,10 @@ public:
AgentInterfaces IsMet(WorldInterface * const world) const;
private:
const std::string referenceEntityName;
const double targetTHW;
const bool freeSpace;
const Rule rule;
std::string referenceEntityName;
double targetTHW;
bool freeSpace;
Rule rule;
};
class OPENPASSCOMMONEXPORT ReachPositionCondition : public ByEntityCondition
......@@ -162,8 +162,8 @@ public:
AgentInterfaces IsMet(WorldInterface * const world) const;
private:
const double tolerance{};
const openScenario::Position position{};
double tolerance{};
openScenario::Position position{};
};
class OPENPASSCOMMONEXPORT RelativeSpeedCondition : public ByEntityCondition
......@@ -184,9 +184,9 @@ public:
AgentInterfaces IsMet(WorldInterface * const world) const;
private:
const std::string referenceEntityName{};
const double value{};
const Rule rule{};
std::string referenceEntityName{};
double value{};
Rule rule{};
};
// OpenScenario ByValue Conditions
......@@ -199,7 +199,7 @@ public:
ByValueCondition(const ByValueCondition&) = default;
virtual ~ByValueCondition();
protected:
const Rule rule;
Rule rule;
};
class OPENPASSCOMMONEXPORT SimulationTimeCondition : public ByValueCondition
......@@ -217,9 +217,10 @@ public:
int GetTargetValue() const;
private:
const int targetValue;
int targetValue;
};
using Condition = std::variant<ReachPositionCondition,
RelativeSpeedCondition,
SimulationTimeCondition,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment