Restore rows() and cols() in aligned_array.h
These getters were removed in https://codereview.webrtc.org/1172163004 but are used in external code, so it makes sense to keep them around to make the class more useful. R=henrikg@webrtc.org, pkasting@chromium.org Review URL: https://codereview.webrtc.org/1178043005. Cr-Commit-Position: refs/heads/master@{#9478}
This commit is contained in:
parent
6ee4816d6f
commit
e8d191f00f
@ -68,6 +68,14 @@ template<typename T> class AlignedArray {
|
||||
return Row(row)[col];
|
||||
}
|
||||
|
||||
int rows() const {
|
||||
return rows_;
|
||||
}
|
||||
|
||||
int cols() const {
|
||||
return cols_;
|
||||
}
|
||||
|
||||
private:
|
||||
int rows_;
|
||||
int cols_;
|
||||
@ -78,4 +86,3 @@ template<typename T> class AlignedArray {
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // WEBRTC_SYSTEM_WRAPPERS_INTERFACE_ALIGNED_ARRAY_
|
||||
|
||||
|
@ -51,5 +51,10 @@ TEST(AlignedArrayTest, CheckOverlap) {
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
TEST(AlignedArrayTest, CheckRowsCols) {
|
||||
AlignedArray<bool> arr(10, 7, 128);
|
||||
ASSERT_EQ(arr.rows(), 10);
|
||||
ASSERT_EQ(arr.cols(), 7);
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
Loading…
Reference in New Issue
Block a user