Skip to content
Snippets Groups Projects
Commit f5a1115d authored by ilor's avatar ilor
Browse files

fix crashes in markmatch / unmarkmatch caused by taking a reference to a...

fix crashes in markmatch / unmarkmatch caused by taking a reference to a shared pointer instead of just making a copy, and a typo
parent 15eba8cc
Branches
No related merge requests found
......@@ -76,9 +76,9 @@ protected:
*/
virtual std::ostream& write_to(std::ostream& ostream) const;
private:
const boost::shared_ptr<Function<Match> >& match_from_;
const boost::shared_ptr<Function<Match> >& match_to_;
const boost::shared_ptr<Function<Match> >& head_match_;
const boost::shared_ptr<Function<Match> > match_from_;
const boost::shared_ptr<Function<Match> > match_to_;
const boost::shared_ptr<Function<Match> > head_match_;
const std::string chan_name_;
};
......
......@@ -16,7 +16,7 @@ public:
UnmarkMatch(
const boost::shared_ptr<Function<Match> >& match,
const std::string& annotation_name)
: match_(match_),
: match_(match),
chan_name_(annotation_name)
{
BOOST_ASSERT(match_);
......@@ -49,7 +49,7 @@ protected:
*/
virtual std::ostream& write_to(std::ostream& ostream) const;
private:
const boost::shared_ptr<Function<Match> >& match_;
const boost::shared_ptr<Function<Match> > match_;
const std::string chan_name_;
};
......
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