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

Commit 896cdca9 authored by Steven Moreland's avatar Steven Moreland Committed by Gerrit Code Review
Browse files

Merge "Create an empty String8 to cause the first allocation"

parents 43360b5b a39f3dbb
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -27,6 +27,8 @@
#include <functional>
#include <vector>

static android::String8 gEmpty(""); // make sure first allocation from optimization runs

struct DestructionAction {
    DestructionAction(std::function<void()> f) : mF(std::move(f)) {}
    ~DestructionAction() { mF(); };