MaxSkew use copy constructor
This commit is contained in:
parent
f07e3d233c
commit
b49f78a8a6
|
|
@ -81,7 +81,7 @@ void
|
||||||
MaxSkewChecksVisitor::visit(MaxSkewCheck &check,
|
MaxSkewChecksVisitor::visit(MaxSkewCheck &check,
|
||||||
const StaState *)
|
const StaState *)
|
||||||
{
|
{
|
||||||
checks_.push_back(check.copy());
|
checks_.push_back(new MaxSkewCheck(check));
|
||||||
}
|
}
|
||||||
|
|
||||||
class MaxSkewViolatorsVisititor : public MaxSkewCheckVisitor
|
class MaxSkewViolatorsVisititor : public MaxSkewCheckVisitor
|
||||||
|
|
@ -108,7 +108,7 @@ MaxSkewViolatorsVisititor::visit(MaxSkewCheck &check,
|
||||||
const StaState *sta)
|
const StaState *sta)
|
||||||
{
|
{
|
||||||
if (fuzzyLess(check.slack(sta), 0.0))
|
if (fuzzyLess(check.slack(sta), 0.0))
|
||||||
checks_.push_back(check.copy());
|
checks_.push_back(new MaxSkewCheck(check));
|
||||||
}
|
}
|
||||||
|
|
||||||
MaxSkewCheckSeq &
|
MaxSkewCheckSeq &
|
||||||
|
|
@ -146,11 +146,10 @@ MaxSkewSlackVisitor::visit(MaxSkewCheck &check,
|
||||||
const StaState *sta)
|
const StaState *sta)
|
||||||
{
|
{
|
||||||
MaxSkewSlackLess slack_less(sta);
|
MaxSkewSlackLess slack_less(sta);
|
||||||
if (min_slack_check_ == nullptr)
|
if (min_slack_check_ == nullptr
|
||||||
min_slack_check_ = check.copy();
|
|| slack_less(&check, min_slack_check_)) {
|
||||||
else if (slack_less(&check, min_slack_check_)) {
|
|
||||||
delete min_slack_check_;
|
delete min_slack_check_;
|
||||||
min_slack_check_ = check.copy();
|
min_slack_check_ = new MaxSkewCheck(check);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -235,12 +234,6 @@ MaxSkewCheck::MaxSkewCheck(PathVertex *clk_path,
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
MaxSkewCheck *
|
|
||||||
MaxSkewCheck::copy()
|
|
||||||
{
|
|
||||||
return new MaxSkewCheck(&clk_path_, &ref_path_, check_arc_, check_edge_);
|
|
||||||
}
|
|
||||||
|
|
||||||
Pin *
|
Pin *
|
||||||
MaxSkewCheck::clkPin(const StaState *sta) const
|
MaxSkewCheck::clkPin(const StaState *sta) const
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,6 @@ public:
|
||||||
PathVertex *ref_path,
|
PathVertex *ref_path,
|
||||||
TimingArc *check_arc,
|
TimingArc *check_arc,
|
||||||
Edge *check_edge);
|
Edge *check_edge);
|
||||||
MaxSkewCheck *copy();
|
|
||||||
PathVertex *clkPath() { return &clk_path_; }
|
PathVertex *clkPath() { return &clk_path_; }
|
||||||
Pin *clkPin(const StaState *sta) const;
|
Pin *clkPin(const StaState *sta) const;
|
||||||
PathVertex *refPath() { return &ref_path_; }
|
PathVertex *refPath() { return &ref_path_; }
|
||||||
|
|
@ -69,8 +68,6 @@ public:
|
||||||
TimingArc *checkArc() const { return check_arc_; }
|
TimingArc *checkArc() const { return check_arc_; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DISALLOW_COPY_AND_ASSIGN(MaxSkewCheck);
|
|
||||||
|
|
||||||
PathVertex clk_path_;
|
PathVertex clk_path_;
|
||||||
PathVertex ref_path_;
|
PathVertex ref_path_;
|
||||||
TimingArc *check_arc_;
|
TimingArc *check_arc_;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue