Skip to content

Commit

Permalink
BUGFIX: Fix some more bugs resulting from const cleanup
Browse files Browse the repository at this point in the history
Also added the "override" keyword to prevent this happening again
ArcaneNibble committed Jun 10, 2017
1 parent 365c790 commit 2e8f215
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/gp4par/Greenpak4PAREngine.cpp
Original file line number Diff line number Diff line change
@@ -209,7 +209,7 @@ uint32_t Greenpak4PAREngine::ComputeCongestionCost() const
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Print logic

void Greenpak4PAREngine::PrintUnroutes(vector<PARGraphEdge*>& unroutes)
void Greenpak4PAREngine::PrintUnroutes(vector<const PARGraphEdge*>& unroutes) const
{
Log(Severity::ERROR, "\nUnroutable nets (%zu):\n", unroutes.size());
LogIndenter li;
@@ -364,7 +364,7 @@ bool Greenpak4PAREngine::CantMoveSrc(Greenpak4BitstreamEntity* src)
return false;
}

bool Greenpak4PAREngine::CanMoveNode(PARGraphNode* node, PARGraphNode* old_mate, PARGraphNode* new_mate)
bool Greenpak4PAREngine::CanMoveNode(PARGraphNode* node, PARGraphNode* old_mate, PARGraphNode* new_mate) const
{
//Let base class filter stuff
if(!PAREngine::CanMoveNode(node, old_mate, new_mate))
12 changes: 6 additions & 6 deletions src/gp4par/Greenpak4PAREngine.h
Original file line number Diff line number Diff line change
@@ -29,15 +29,15 @@ class Greenpak4PAREngine : public PAREngine
virtual ~Greenpak4PAREngine();

protected:
virtual void PrintUnroutes(std::vector<PARGraphEdge*>& unroutes);
virtual void PrintUnroutes(std::vector<const PARGraphEdge*>& unroutes) const override;

virtual void FindSubOptimalPlacements(std::vector<PARGraphNode*>& bad_nodes);
virtual PARGraphNode* GetNewPlacementForNode(PARGraphNode* pivot);
virtual void FindSubOptimalPlacements(std::vector<PARGraphNode*>& bad_nodes) override;
virtual PARGraphNode* GetNewPlacementForNode(PARGraphNode* pivot) override;

virtual uint32_t ComputeCongestionCost() const;
virtual bool InitialPlacement_core();
virtual uint32_t ComputeCongestionCost() const override;
virtual bool InitialPlacement_core() override;

virtual bool CanMoveNode(PARGraphNode* node, PARGraphNode* old_mate, PARGraphNode* new_mate);
virtual bool CanMoveNode(PARGraphNode* node, PARGraphNode* old_mate, PARGraphNode* new_mate) const override;

bool CantMoveSrc(Greenpak4BitstreamEntity* src);
bool CantMoveDst(Greenpak4BitstreamEntity* dst);

0 comments on commit 2e8f215

Please sign in to comment.