File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,11 +40,10 @@ class MarkovImpl : public virtual Markov {
4040 }
4141
4242 MarkovImpl &operator =(const MarkovImpl &other) {
43- MarkovImpl temp (GetLoggerName ());
44-
45- temp.SetTransitions (other.GetTransitions ());
46- temp.SetState (other.GetState ());
47- return temp;
43+ _logger_name = other.GetLoggerName ();
44+ this ->SetTransitions (other.GetTransitions ());
45+ this ->SetState (other.GetState ());
46+ return *this ;
4847 }
4948
5049 void SetState (const Eigen::VectorXd &state_vector) override {
@@ -74,7 +73,7 @@ class MarkovImpl : public virtual Markov {
7473 std::string GetLoggerName () const override { return _logger_name; }
7574
7675private:
77- const std::string _logger_name;
76+ std::string _logger_name;
7877 Eigen::VectorXd _state;
7978 std::vector<transition> _transitions = {};
8079 std::map<int , stamper> _stamper_functions;
@@ -121,4 +120,4 @@ class MarkovImpl : public virtual Markov {
121120};
122121} // namespace respond
123122
124- #endif // RESPOND_MARKOVINTERNALS_HPP_
123+ #endif // RESPOND_MARKOVINTERNALS_HPP_
You can’t perform that action at this time.
0 commit comments