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

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

Merge cherrypicks of [9736158, 9736323, 9736226, 9736227, 9736476, 9736477,...

Merge cherrypicks of [9736158, 9736323, 9736226, 9736227, 9736476, 9736477, 9736478, 9736176, 9736136] into qt-qpr1-b-release

Change-Id: I37a1974faabff389449ab547d92ffeca604284d8
parents f0db8d04 73a1bebe
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) {