Skip to content

Commit 832d7ce

Browse files
committed
Don't use using of std::-types in headers.
Signed-off-by: Henner Zeller <[email protected]>
1 parent 6f4b99d commit 832d7ce

File tree

12 files changed

+17
-36
lines changed

12 files changed

+17
-36
lines changed

include/ord/OpenRoad.hh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,6 @@ class EstimateParasitics;
126126

127127
namespace ord {
128128

129-
using std::string;
130-
131129
class dbVerilogNetwork;
132130

133131
// Only pointers to components so the header has no dependents.
@@ -205,7 +203,7 @@ class OpenRoad
205203
void writeDef(const char* filename, const char* version);
206204
void writeDef(const char* filename,
207205
// major.minor (avoid including defout.h)
208-
const string& version);
206+
const std::string& version);
209207

210208
void writeCdl(const char* out_filename,
211209
const std::vector<const char*>& masters_filenames,

src/OpenRoad.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ void OpenRoad::readDef(const char* filename,
355355
def_reader.readChip(search_libs, filename, chip);
356356
}
357357

358-
static odb::defout::Version stringToDefVersion(const string& version)
358+
static odb::defout::Version stringToDefVersion(const std::string& version)
359359
{
360360
if (version == "5.8") {
361361
return odb::defout::Version::DEF_5_8;
@@ -383,7 +383,7 @@ void OpenRoad::writeDef(const char* filename, const char* version)
383383
writeDef(filename, std::string(version));
384384
}
385385

386-
void OpenRoad::writeDef(const char* filename, const string& version)
386+
void OpenRoad::writeDef(const char* filename, const std::string& version)
387387
{
388388
odb::dbChip* chip = db_->getChip();
389389
if (chip) {
@@ -443,7 +443,7 @@ void OpenRoad::writeLef(const char* filename)
443443
std::string name(filename);
444444
if (cnt > 0) {
445445
auto pos = name.rfind('.');
446-
if (pos != string::npos) {
446+
if (pos != std::string::npos) {
447447
name.insert(pos, "_" + std::to_string(cnt));
448448
} else {
449449
name += "_" + std::to_string(cnt);

src/rsz/src/BaseMove.hh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,6 @@ class EstimateParasitics;
4646

4747
namespace rsz {
4848

49-
using std::string;
50-
using std::vector;
51-
5249
using odb::dbMaster;
5350

5451
using odb::dbMaster;
@@ -234,7 +231,7 @@ class BaseMove : public sta::dbStaState
234231
static constexpr int buffer_removal_max_fanout_ = 10;
235232
static constexpr float rebuffer_relaxation_factor_ = 0.03;
236233

237-
vector<const Pin*> getFanouts(const Instance* inst);
234+
std::vector<const Pin*> getFanouts(const Instance* inst);
238235
};
239236

240237
} // namespace rsz

src/rsz/src/BufferMove.hh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ class EstimateParasitics;
99

1010
namespace rsz {
1111

12-
using std::string;
13-
1412
using sta::ArcDelay;
1513
using sta::Instance;
1614
using sta::InstancePinIterator;

src/rsz/src/CloneMove.hh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55

66
namespace rsz {
77

8-
using std::pair;
9-
using std::string;
10-
using std::vector;
11-
128
using odb::Point;
139

1410
using sta::InstancePinIterator;

src/rsz/src/ConcreteSwapArithModules.cc

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ void ConcreteSwapArithModules::replaceArithModules(const int path_count,
6161

6262
// Identify critical mod instances based on target, path_count and
6363
// slack_threshold
64-
set<dbModInst*> arithInsts;
64+
std::set<dbModInst*> arithInsts;
6565
findCriticalInstances(path_count, target, slack_threshold, arithInsts);
6666
if (arithInsts.empty()) {
6767
return;
@@ -75,7 +75,7 @@ void ConcreteSwapArithModules::findCriticalInstances(
7575
const int path_count,
7676
const std::string& target,
7777
const float slack_threshold,
78-
set<dbModInst*>& insts)
78+
std::set<dbModInst*>& insts)
7979
{
8080
logger_->info(RSZ,
8181
152,
@@ -130,7 +130,7 @@ void ConcreteSwapArithModules::findCriticalInstances(
130130

131131
void ConcreteSwapArithModules::collectArithInstsOnPath(
132132
const Path* path,
133-
set<dbModInst*>& arithInsts)
133+
std::set<dbModInst*>& arithInsts)
134134
{
135135
PathExpanded expanded(path, sta_);
136136
if (expanded.size() > 1) {
@@ -224,8 +224,9 @@ bool ConcreteSwapArithModules::hasArithOperatorProperty(
224224
return false;
225225
}
226226

227-
void ConcreteSwapArithModules::doSwapInstances(const set<dbModInst*>& insts,
228-
const std::string& target)
227+
void ConcreteSwapArithModules::doSwapInstances(
228+
const std::set<dbModInst*>& insts,
229+
const std::string& target)
229230
{
230231
int swapped_count = 0;
231232

src/rsz/src/ConcreteSwapArithModules.hh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ class ConcreteSwapArithModules : public SwapArithModules
1919
const std::string& target,
2020
float slack_threshold) override;
2121
void collectArithInstsOnPath(const Path* path,
22-
set<dbModInst*>& arithInsts) override;
22+
std::set<dbModInst*>& arithInsts) override;
2323
bool isArithInstance(const Instance* inst, dbModInst*& mod_inst) override;
2424
bool hasArithOperatorProperty(const dbModInst* mod_inst) override;
2525
void findCriticalInstances(int path_count,
2626
const std::string& target,
2727
float slack_threshold,
28-
set<dbModInst*>& insts) override;
29-
void doSwapInstances(const set<dbModInst*>& insts,
28+
std::set<dbModInst*>& insts) override;
29+
void doSwapInstances(const std::set<dbModInst*>& insts,
3030
const std::string& target) override;
3131

3232
protected:

src/rsz/src/SizeDownMove.hh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55

66
namespace rsz {
77

8-
using std::string;
9-
108
using sta::ArcDelay;
119
using sta::InstancePinIterator;
1210
using sta::LoadPinIndexMap;

src/rsz/src/SplitLoadMove.hh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55

66
namespace rsz {
77

8-
using std::string;
9-
108
using sta::ArcDelay;
119
using sta::InstancePinIterator;
1210
using sta::LoadPinIndexMap;

src/rsz/src/SwapArithModules.hh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ class Resizer;
3838
using odb::dbModInst;
3939
using sta::Instance;
4040
using sta::Path;
41-
using std::set;
4241
using utl::Logger;
4342

4443
class SwapArithModules : public sta::dbStaState
@@ -52,16 +51,16 @@ class SwapArithModules : public sta::dbStaState
5251
float slack_threshold)
5352
= 0;
5453
virtual void collectArithInstsOnPath(const Path* path,
55-
set<dbModInst*>& arithInsts)
54+
std::set<dbModInst*>& arithInsts)
5655
= 0;
5756
virtual bool isArithInstance(const Instance* inst, dbModInst*& mod_inst) = 0;
5857
virtual bool hasArithOperatorProperty(const dbModInst* mod_inst) = 0;
5958
virtual void findCriticalInstances(int path_count,
6059
const std::string& target,
6160
float slack_threshold,
62-
set<dbModInst*>& insts)
61+
std::set<dbModInst*>& insts)
6362
= 0;
64-
virtual void doSwapInstances(const set<dbModInst*>& insts,
63+
virtual void doSwapInstances(const std::set<dbModInst*>& insts,
6564
const std::string& target)
6665
= 0;
6766

0 commit comments

Comments
 (0)