diff --git a/search/CheckMaxSkews.cc b/search/CheckMaxSkews.cc index 74cfceb2..3935e752 100644 --- a/search/CheckMaxSkews.cc +++ b/search/CheckMaxSkews.cc @@ -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 { diff --git a/search/CheckMaxSkews.hh b/search/CheckMaxSkews.hh index bacc84f5..4a8ab80b 100644 --- a/search/CheckMaxSkews.hh +++ b/search/CheckMaxSkews.hh @@ -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_;