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

Commit a1917747 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "SF: Pass map by const reference instead of copy"

parents 4d531bd0 2c909851
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ proto::TransactionState TransactionProtoParser::toProto(const TransactionState&
}

proto::TransactionState TransactionProtoParser::toProto(
        const std::map<int32_t /* layerId */, TracingLayerState> states) {
        const std::map<int32_t /* layerId */, TracingLayerState>& states) {
    proto::TransactionState proto;
    for (auto& [layerId, state] : states) {
        proto::LayerState layerProto = toProto(state, nullptr);
+2 −2
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@ public:
    static proto::TransactionState toProto(const TransactionState&, LayerHandleToIdFn getLayerIdFn,
                                           DisplayHandleToIdFn getDisplayIdFn);
    static proto::TransactionState toProto(
            const std::map<int32_t /* layerId */, TracingLayerState>);
            const std::map<int32_t /* layerId */, TracingLayerState>&);

    static proto::LayerCreationArgs toProto(const TracingLayerCreationArgs& args);