Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(822)

Unified Diff: webrtc/system_wrappers/include/aligned_array.h

Issue 1534193008: Misc. small cleanups (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Unnecessary parens Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/system_wrappers/include/aligned_array.h
diff --git a/webrtc/system_wrappers/include/aligned_array.h b/webrtc/system_wrappers/include/aligned_array.h
index 7cd182c29630717c1f02868dbb6c4272eda0db6d..e985e8835732dceffd4b129e7478eac2fd692b44 100644
--- a/webrtc/system_wrappers/include/aligned_array.h
+++ b/webrtc/system_wrappers/include/aligned_array.h
@@ -20,16 +20,15 @@ namespace webrtc {
// aligned to the given byte alignment.
template<typename T> class AlignedArray {
public:
- AlignedArray(int rows, size_t cols, int alignment)
+ AlignedArray(int rows, size_t cols, size_t alignment)
: rows_(rows),
- cols_(cols),
- alignment_(alignment) {
- RTC_CHECK_GT(alignment_, 0);
+ cols_(cols) {
+ RTC_CHECK_GT(alignment, 0u);
head_row_ = static_cast<T**>(AlignedMalloc(rows_ * sizeof(*head_row_),
- alignment_));
+ alignment));
for (int i = 0; i < rows_; ++i) {
head_row_[i] = static_cast<T*>(AlignedMalloc(cols_ * sizeof(**head_row_),
- alignment_));
+ alignment));
}
}
@@ -79,7 +78,6 @@ template<typename T> class AlignedArray {
private:
int rows_;
size_t cols_;
- int alignment_;
T** head_row_;
};
« no previous file with comments | « webrtc/modules/media_file/media_file_utility.cc ('k') | webrtc/system_wrappers/source/aligned_array_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698