Skip to content

Commit 2c9856d

Browse files
committed
odb: resolve clang-tidy from #9096
Signed-off-by: Matt Liberty <[email protected]>
1 parent 0d1742a commit 2c9856d

File tree

6 files changed

+15
-3
lines changed

6 files changed

+15
-3
lines changed

src/odb/src/codeGenerator/schema/tech/dbTechLayerCornerSpacingRule.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,5 +100,11 @@
100100
],
101101
"cpp_includes": [
102102
"dbTechLayer.h"
103+
],
104+
"cpp_sys_includes": [
105+
"utility"
106+
],
107+
"h_sys_includes": [
108+
"utility"
103109
]
104110
}

src/odb/src/db/dbModBTerm.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
#include "dbCommon.h"
2525
#include "odb/dbBlockCallBackObj.h"
26+
#include "odb/odb.h"
2627
#include "utl/Logger.h"
2728
// User Code End Includes
2829
namespace odb {

src/odb/src/db/dbTechLayerCornerSpacingRule.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#include <cstdint>
88
#include <cstring>
9+
#include <utility>
910

1011
#include "dbDatabase.h"
1112
#include "dbTable.h"

src/odb/src/db/dbTechLayerCornerSpacingRule.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
// Generator Code Begin Header
55
#pragma once
66

7+
#include <utility>
8+
79
#include "dbCore.h"
810
#include "odb/odb.h"
911
// User Code Begin Includes

src/odb/src/db/dbTechLayerSpacingEolRule.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
#include "dbCore.h"
88
#include "odb/odb.h"
9+
// User Code Begin Includes
10+
#include "odb/dbId.h"
11+
// User Code End Includes
912

1013
namespace odb {
1114
class dbIStream;

src/odb/src/db/tmg_conn_g.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
#include "tmg_conn_g.h"
55

6+
#include <algorithm>
67
#include <cstdio>
78
#include <cstdlib>
89
#include <memory>
@@ -51,9 +52,7 @@ void tmg_conn_graph::init(const int ptN, const int shortN)
5152
}
5253
if (4 * ptN + 2 * shortN > eNmax_) {
5354
eNmax_ *= 2;
54-
if (4 * ptN + 2 * shortN > eNmax_) {
55-
eNmax_ = 4 * ptN + 2 * shortN;
56-
}
55+
eNmax_ = std::max(4 * ptN + 2 * shortN, eNmax_);
5756
free(eV_);
5857
eV_ = (tcg_edge*) safe_malloc(eNmax_ * sizeof(tcg_edge));
5958
}

0 commit comments

Comments
 (0)