@@ -172,13 +172,13 @@ bool Blif::writeBlif(const char* file_name, bool write_arrival_requireds)
172172 && (expr->op () == sta::FuncExpr::op_zero
173173 || expr->op () == sta::FuncExpr::op_one)) {
174174 if (expr->op () == sta::FuncExpr::op_zero) {
175- if (! const0.size ()) {
175+ if (const0.empty ()) {
176176 const0_cell_ = port_->libertyCell ()->name ();
177177 const0_cell_port_ = port_->name ();
178178 }
179179 const0.insert (netName);
180180 } else {
181- if (! const1.size ()) {
181+ if (const1.empty ()) {
182182 const1_cell_ = port_->libertyCell ()->name ();
183183 const1_cell_port_ = port_->name ();
184184 }
@@ -291,7 +291,7 @@ bool Blif::writeBlif(const char* file_name, bool write_arrival_requireds)
291291 }
292292 f << " \n " ;
293293
294- if (clocks.size () > 0 ) {
294+ if (! clocks.empty () ) {
295295 f << " .clock" ;
296296 for (auto & clock : clocks) {
297297 f << " " << clock;
@@ -420,7 +420,7 @@ bool Blif::readBlif(const char* file_name, odb::dbBlock* block)
420420 for (auto iterm : iterms) {
421421 auto net = iterm->getNet ();
422422 iterm->disconnect ();
423- if (net && net->getITerms ().size () == 0 && net->getBTerms ().size () == 0 ) {
423+ if (net && net->getITerms ().empty () && net->getBTerms ().empty () ) {
424424 odb::dbNet::destroy (net);
425425 }
426426 }
@@ -447,7 +447,7 @@ bool Blif::readBlif(const char* file_name, odb::dbBlock* block)
447447
448448 if (master == nullptr
449449 && (masterName == " _const0_" || masterName == " _const1_" )) {
450- if (connections.size () < 1 ) {
450+ if (connections.empty () ) {
451451 logger_->info (CUT,
452452 9 ,
453453 " Const driver {} doesn't have any connected nets." ,
@@ -566,7 +566,7 @@ bool Blif::readBlif(const char* file_name, odb::dbBlock* block)
566566 }
567567 }
568568
569- if (mtermName == " " ) {
569+ if (mtermName. empty () ) {
570570 logger_->info (CUT,
571571 13 ,
572572 " Could not connect instance of cell type {} to {} net "
@@ -613,15 +613,15 @@ float Blif::getArrivalTime(sta::Pin* term, bool is_rise)
613613 return arr;
614614}
615615
616- void Blif::addArrival (sta::Pin* pin, std::string netName)
616+ void Blif::addArrival (sta::Pin* pin, const std::string& netName)
617617{
618618 if (arrivals_.find (netName) == arrivals_.end ()) {
619619 arrivals_[netName] = std::pair<float , float >(
620620 getArrivalTime (pin, true ) * 1e12 , getArrivalTime (pin, false ) * 1e12 );
621621 }
622622}
623623
624- void Blif::addRequired (sta::Pin* pin, std::string netName)
624+ void Blif::addRequired (sta::Pin* pin, const std::string& netName)
625625{
626626 if (requireds_.find (netName) == requireds_.end ()) {
627627 requireds_[netName] = std::pair<float , float >(
0 commit comments