Add utility integer alignment function

This commit is contained in:
baldurk
2016-11-28 17:45:57 +01:00
parent 060a1caa8f
commit 288cce9de5
+6
View File
@@ -31,6 +31,12 @@
#include <QSortFilterProxyModel>
#include "renderdoc_replay.h"
template <typename T>
inline T AlignUp(T x, T a)
{
return (x + (a - 1)) & (~(a - 1));
}
#ifndef ARRAY_COUNT
#define ARRAY_COUNT(arr) (sizeof(arr) / sizeof(arr[0]))
#endif