Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 380b7752 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Merge cherrypicks of [9736358, 9736296, 9735406, 9736235, 9736059, 9736060,...

Merge cherrypicks of [9736358, 9736296, 9735406, 9736235, 9736059, 9736060, 9736236, 9736297, 9736298, 9735210, 9735309] into qt-qpr1-release

Change-Id: I4c199d94d6500c361b00d1d13ece63a1e90b7350
parents f0db8d04 b5d3e902
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -47,7 +47,12 @@ public:

    template<size_t N>
    static size_t align(void*& buffer) {
        return align<N>( const_cast<void const*&>(buffer) );
        static_assert(!(N & (N - 1)), "Can only align to a power of 2.");
        void* b = buffer;
        buffer = reinterpret_cast<void*>((uintptr_t(buffer) + (N-1)) & ~(N-1));
        size_t delta = size_t(uintptr_t(buffer) - uintptr_t(b));
        memset(b, 0, delta);
        return delta;
    }

    static void advance(void*& buffer, size_t& size, size_t offset) {