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

Commit 5a018799 authored by Greg Kaiser's avatar Greg Kaiser
Browse files

TracedOrdinal: Avoid string copy

For a minor performance improvement, we pass our string to the
constructor by const reference.

Test: TreeHugger
Change-Id: Ibc00f02f46fc25243cc4e6c0af4ed2d2805770da
parent 159b5ed5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ public:
                  "Type is not supported. Please test it with systrace before adding "
                  "it to the list.");

    TracedOrdinal(std::string name, T initialValue)
    TracedOrdinal(const std::string& name, T initialValue)
          : mName(name),
            mNameNegative(android::base::StringPrintf("%sNegative", name.c_str())),
            mHasGoneNegative(std::signbit(initialValue)),