Skip to content

Commit 0fe2e99

Browse files
author
osamahammad21
committed
odb: fix clang-tidy-bazel failures
Signed-off-by: osamahammad21 <osama@precisioninno.com>
1 parent 69d3b38 commit 0fe2e99

5 files changed

Lines changed: 14 additions & 7 deletions

File tree

src/odb/src/3dblox/checker.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <utility>
1616
#include <vector>
1717

18+
#include "odb/PtrSetMap.h"
1819
#include "odb/db.h"
1920
#include "odb/dbObject.h"
2021
#include "odb/dbTransform.h"
@@ -84,8 +85,7 @@ using AlignmentViolationReporter
8485
const std::string&)>;
8586

8687
void matchMarkersBetweenChips(
87-
const std::unordered_map<dbMaster*, std::vector<dbAlignmentMarkerRule*>>&
88-
rules_by_master,
88+
const PtrMap<dbMaster, std::vector<dbAlignmentMarkerRule*>>& rules_by_master,
8989
const std::vector<AlignmentMarkerIndex::Value>& list_a,
9090
const std::vector<AlignmentMarkerIndex::Value>& list_b,
9191
dbUnfoldedChipInst* c_a,
@@ -496,8 +496,7 @@ void Checker::checkAlignmentMarkers(dbMarkerCategory* top_cat)
496496
{
497497
// Build the per-master rule index. Local to this check; alignment-marker
498498
// rules are queried only here, so there's no point persisting it.
499-
std::unordered_map<dbMaster*, std::vector<dbAlignmentMarkerRule*>>
500-
rules_by_master;
499+
PtrMap<dbMaster, std::vector<dbAlignmentMarkerRule*>> rules_by_master;
501500
for (dbAlignmentMarkerRule* rule : db_->getAlignmentMarkerRules()) {
502501
rules_by_master[rule->getMasterA()].push_back(rule);
503502
if (rule->getMasterB() != rule->getMasterA()) {
@@ -510,8 +509,7 @@ void Checker::checkAlignmentMarkers(dbMarkerCategory* top_cat)
510509

511510
// Materialize the per-chip marker lists by walking each unfolded chip's
512511
// leaf block and filtering by master against the rule index.
513-
std::unordered_map<dbUnfoldedChipInst*, std::vector<UnfoldedAlignmentMarker>>
514-
markers;
512+
PtrMap<dbUnfoldedChipInst, std::vector<UnfoldedAlignmentMarker>> markers;
515513
for (dbUnfoldedChipInst* chip : db_->getUnfoldedChipInsts()) {
516514
std::vector<dbChipInst*> path = chip->getChipInstPath();
517515
if (path.empty()) {

src/odb/src/db/dbUnfoldedChipBumpInstItr.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
#include "dbTable.h"
1010
#include "dbUnfoldedChipBumpInst.h"
1111
#include "dbUnfoldedChipRegionInst.h"
12+
// User Code Begin Includes
13+
#include "odb/dbObject.h"
14+
// User Code End Includes
1215

1316
namespace odb {
1417

src/odb/src/db/dbUnfoldedChipNet.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
#include "dbTable.h"
1111
#include "dbUnfoldedChipBumpInst.h"
1212
#include "odb/db.h"
13+
// User Code Begin Includes
14+
#include <vector>
15+
// User Code End Includes
1316
namespace odb {
1417
template class dbTable<_dbUnfoldedChipNet>;
1518

src/odb/src/db/dbUnfoldedChipRegionInst.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include "odb/dbSet.h"
1818
#include "odb/geom.h"
1919
// User Code Begin Includes
20-
#include "dbUnfoldedChipBumpInstItr.h"
20+
#include "dbUnfoldedChipBumpInstItr.h" // IWYU pragma: keep
2121
// User Code End Includes
2222
namespace odb {
2323
template class dbTable<_dbUnfoldedChipRegionInst>;

src/odb/src/db/dbUnfoldedChipRegionInstItr.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
#include "dbTable.h"
1010
#include "dbUnfoldedChipInst.h"
1111
#include "dbUnfoldedChipRegionInst.h"
12+
// User Code Begin Includes
13+
#include "odb/dbObject.h"
14+
// User Code End Includes
1215

1316
namespace odb {
1417

0 commit comments

Comments
 (0)