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

Commit 069fb341 authored by Greg Kaiser's avatar Greg Kaiser
Browse files

Take arguments by const reference

We avoid an unneccessary copy of these vectors.

Bug: 190676649
Test: TreeHugger
Change-Id: I0eeb24b0d0e62bf1d1f900f0febb6e2b57424fc5
parent f8b63dd2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -88,8 +88,8 @@ static void audio_state_cb(const RawAddress& bd_addr, btav_audio_state_t state)
static void audio_config_cb(
    const RawAddress& bd_addr,
    btav_a2dp_codec_config_t codec_config,
    std::vector<btav_a2dp_codec_config_t> codecs_local_capabilities,
    std::vector<btav_a2dp_codec_config_t> codecs_selectable_capabilities) {
    const std::vector<btav_a2dp_codec_config_t>& codecs_local_capabilities,
    const std::vector<btav_a2dp_codec_config_t>& codecs_selectable_capabilities) {
  RustRawAddress addr = to_rust_address(bd_addr);
  A2dpCodecConfig cfg = to_rust_codec_config(codec_config);
  ::rust::Vec<A2dpCodecConfig> lcaps = to_rust_codec_config_vec(codecs_local_capabilities);