Skip to content

Commit d973658

Browse files
committed
ram: fix uninit values in layout classes
Signed-off-by: Matt Liberty <[email protected]>
1 parent 0beeba7 commit d973658

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

src/ram/src/layout.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ using odb::Rect;
1515

1616
//////////////////////////////////////////////////////////////
1717

18-
Cell::Cell() : origin_(0, 0), orient_(dbOrientType::R0)
19-
{
20-
}
21-
2218
Cell::Cell(const Point& position, dbOrientType orient)
2319
: origin_(position), orient_(orient)
2420
{

src/ram/src/layout.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace ram {
1414
class Cell
1515
{
1616
public:
17-
Cell();
17+
Cell() = default;
1818

1919
Cell(const odb::Point& position, odb::dbOrientType orient);
2020

@@ -35,8 +35,8 @@ class Cell
3535
private:
3636
odb::Point origin_;
3737
odb::dbOrientType orient_;
38-
int height_;
39-
int width_;
38+
int height_{0};
39+
int width_{0};
4040
std::vector<odb::dbInst*> insts_;
4141
};
4242

@@ -62,8 +62,8 @@ class Layout
6262
private:
6363
odb::Orientation2D orientation_;
6464
odb::Point origin_;
65-
int cell_height_;
66-
int cell_width_;
65+
int cell_height_{0};
66+
int cell_width_{0};
6767
std::vector<std::unique_ptr<Cell>> cells_;
6868
};
6969

@@ -97,8 +97,8 @@ class Grid
9797
private:
9898
odb::Orientation2D orientation_;
9999
odb::Point origin_;
100-
int cell_height_;
101-
int cell_width_;
100+
int cell_height_{0};
101+
int cell_width_{0};
102102
std::vector<std::unique_ptr<Layout>> layouts_;
103103
};
104104

0 commit comments

Comments
 (0)