Skip to content

Commit 687105b

Browse files
committed
Fixed locked member function in Region class
1 parent 37ad863 commit 687105b

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

libs/libvtrutil/src/vtr_geometry.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ class Rect {
141141
template<class T>
142142
Rect<T> bounding_box(const Rect<T>& lhs, const Rect<T>& rhs);
143143

144-
//Return the intersection (union) of two given rectangles
144+
//Return the intersection of two given rectangles
145145
template<class T>
146146
Rect<T> intersection(const Rect<T>& lhs, const Rect<T>& rhs);
147147

vpr/src/base/region.cpp

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -73,21 +73,7 @@ Region Region::regions_intersection(Region region) {
7373
}
7474

7575
bool Region::locked() {
76-
bool locked = false;
77-
78-
if (region_bounds.xmin() != region_bounds.xmax()) {
79-
return locked;
80-
}
81-
82-
if (region_bounds.ymin() != region_bounds.ymax()) {
83-
return locked;
84-
}
85-
86-
if (sub_tile == NO_SUBTILE) {
87-
return locked;
88-
}
89-
90-
return locked = true;
76+
return region_bounds.xmin() == region_bounds.xmax() && region_bounds.ymin() == region_bounds.ymax() && sub_tile != NO_SUBTILE;
9177
}
9278

9379
bool Region::empty() {

0 commit comments

Comments
 (0)