mirror of
https://github.com/The-OpenROAD-Project/OpenSTA.git
synced 2026-05-30 00:24:12 +08:00
MaxSkew use copy constructor
This commit is contained in:
@@ -81,7 +81,7 @@ void
|
||||
MaxSkewChecksVisitor::visit(MaxSkewCheck &check,
|
||||
const StaState *)
|
||||
{
|
||||
checks_.push_back(check.copy());
|
||||
checks_.push_back(new MaxSkewCheck(check));
|
||||
}
|
||||
|
||||
class MaxSkewViolatorsVisititor : public MaxSkewCheckVisitor
|
||||
@@ -108,7 +108,7 @@ MaxSkewViolatorsVisititor::visit(MaxSkewCheck &check,
|
||||
const StaState *sta)
|
||||
{
|
||||
if (fuzzyLess(check.slack(sta), 0.0))
|
||||
checks_.push_back(check.copy());
|
||||
checks_.push_back(new MaxSkewCheck(check));
|
||||
}
|
||||
|
||||
MaxSkewCheckSeq &
|
||||
@@ -146,11 +146,10 @@ MaxSkewSlackVisitor::visit(MaxSkewCheck &check,
|
||||
const StaState *sta)
|
||||
{
|
||||
MaxSkewSlackLess slack_less(sta);
|
||||
if (min_slack_check_ == nullptr)
|
||||
min_slack_check_ = check.copy();
|
||||
else if (slack_less(&check, min_slack_check_)) {
|
||||
if (min_slack_check_ == nullptr
|
||||
|| slack_less(&check, 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 *
|
||||
MaxSkewCheck::clkPin(const StaState *sta) const
|
||||
{
|
||||
|
||||
@@ -58,7 +58,6 @@ public:
|
||||
PathVertex *ref_path,
|
||||
TimingArc *check_arc,
|
||||
Edge *check_edge);
|
||||
MaxSkewCheck *copy();
|
||||
PathVertex *clkPath() { return &clk_path_; }
|
||||
Pin *clkPin(const StaState *sta) const;
|
||||
PathVertex *refPath() { return &ref_path_; }
|
||||
@@ -69,8 +68,6 @@ public:
|
||||
TimingArc *checkArc() const { return check_arc_; }
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(MaxSkewCheck);
|
||||
|
||||
PathVertex clk_path_;
|
||||
PathVertex ref_path_;
|
||||
TimingArc *check_arc_;
|
||||
|
||||
Reference in New Issue
Block a user