Skip to content

Commit 2e8f215

Browse files
committedJun 10, 2017
BUGFIX: Fix some more bugs resulting from const cleanup
Also added the "override" keyword to prevent this happening again
1 parent 365c790 commit 2e8f215

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed
 

Diff for: ‎src/gp4par/Greenpak4PAREngine.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ uint32_t Greenpak4PAREngine::ComputeCongestionCost() const
209209
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
210210
// Print logic
211211

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

367-
bool Greenpak4PAREngine::CanMoveNode(PARGraphNode* node, PARGraphNode* old_mate, PARGraphNode* new_mate)
367+
bool Greenpak4PAREngine::CanMoveNode(PARGraphNode* node, PARGraphNode* old_mate, PARGraphNode* new_mate) const
368368
{
369369
//Let base class filter stuff
370370
if(!PAREngine::CanMoveNode(node, old_mate, new_mate))

Diff for: ‎src/gp4par/Greenpak4PAREngine.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ class Greenpak4PAREngine : public PAREngine
2929
virtual ~Greenpak4PAREngine();
3030

3131
protected:
32-
virtual void PrintUnroutes(std::vector<PARGraphEdge*>& unroutes);
32+
virtual void PrintUnroutes(std::vector<const PARGraphEdge*>& unroutes) const override;
3333

34-
virtual void FindSubOptimalPlacements(std::vector<PARGraphNode*>& bad_nodes);
35-
virtual PARGraphNode* GetNewPlacementForNode(PARGraphNode* pivot);
34+
virtual void FindSubOptimalPlacements(std::vector<PARGraphNode*>& bad_nodes) override;
35+
virtual PARGraphNode* GetNewPlacementForNode(PARGraphNode* pivot) override;
3636

37-
virtual uint32_t ComputeCongestionCost() const;
38-
virtual bool InitialPlacement_core();
37+
virtual uint32_t ComputeCongestionCost() const override;
38+
virtual bool InitialPlacement_core() override;
3939

40-
virtual bool CanMoveNode(PARGraphNode* node, PARGraphNode* old_mate, PARGraphNode* new_mate);
40+
virtual bool CanMoveNode(PARGraphNode* node, PARGraphNode* old_mate, PARGraphNode* new_mate) const override;
4141

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

0 commit comments

Comments
 (0)
Please sign in to comment.