Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions OpenSim/Simulation/Control/ControlLinearNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,11 @@ operator=(const ControlLinearNode &aNode)
* @return True if the times are equal, false otherwise.
*/
bool ControlLinearNode::
operator==(const ControlLinearNode &aNode) const
operator==(const Object &aNode) const
{
if((_t) > aNode._t) return(false);
if((_t) < aNode._t) return(false);
const auto& node = dynamic_cast<const ControlLinearNode&>(aNode);
if((_t) > node._t) return(false);
if((_t) < node._t) return(false);
return(true);
}

Expand All @@ -159,9 +160,10 @@ operator==(const ControlLinearNode &aNode) const
* @return True if the time of this node is less than the time of aNode.
*/
bool ControlLinearNode::
operator<(const ControlLinearNode &aNode) const
operator<(const Object &aNode) const
{
if(_t<aNode._t) return(true);
const auto& node = dynamic_cast<const ControlLinearNode&>(aNode);
if(node._t) return(true);
else return(false);
}

Expand Down
4 changes: 2 additions & 2 deletions OpenSim/Simulation/Control/ControlLinearNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ OpenSim_DECLARE_CONCRETE_OBJECT(ControlLinearNode, Object);
public:
#ifndef SWIG
ControlLinearNode& operator=(const ControlLinearNode &aControl);
bool operator==(const ControlLinearNode &aControl) const;
bool operator<(const ControlLinearNode &aControl) const;
bool operator==(const Object &aControl) const override;
bool operator<(const Object &aControl) const override;

friend std::ostream& operator<<(std::ostream &aOut,
const ControlLinearNode &aControlLinearNode);
Expand Down
Loading