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

Commit 2c909851 authored by Greg Kaiser's avatar Greg Kaiser Committed by Vishnu Nair
Browse files

SF: Pass map by const reference instead of copy

Test: TreeHugger
Bug: 200284593
Change-Id: I8564cb46066c7bcd004ec2cc621a4f7e2134d34b
parent 2c709212
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);