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

Commit 390f74e8 authored by Chen Chen's avatar Chen Chen
Browse files

GD metrics: remove reference before move

Test: gd/cert/run
Bug: 181819141
Tag: #stability
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: Iebe25a935aac2e1936734f775f617496ef920fd1
parent 46d67b40
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@
namespace bluetooth {
namespace hci {

void log_link_layer_connection_hci_event(std::unique_ptr<CommandView>& command_view, EventView& event_view) {
void log_link_layer_connection_hci_event(std::unique_ptr<CommandView>& command_view, EventView event_view) {
  ASSERT(event_view.IsValid());
  EventCode event_code = event_view.GetEventCode();
  switch (event_code) {
@@ -228,8 +228,8 @@ void log_link_layer_connection_command_status(std::unique_ptr<CommandView>& comm
      static_cast<uint16_t>(reason));
}

void log_link_layer_connection_command_complete(EventView& event_view, std::unique_ptr<CommandView>& command_view) {
  CommandCompleteView command_complete_view = CommandCompleteView::Create(event_view);
void log_link_layer_connection_command_complete(EventView event_view, std::unique_ptr<CommandView>& command_view) {
  CommandCompleteView command_complete_view = CommandCompleteView::Create(std::move(event_view));
  ASSERT(command_complete_view.IsValid());
  OpCode op_code = command_complete_view.GetCommandOpCode();

@@ -309,7 +309,7 @@ void log_link_layer_connection_command_complete(EventView& event_view, std::uniq
      static_cast<uint16_t>(reason));
}

void log_link_layer_connection_other_hci_event(EventView& packet) {
void log_link_layer_connection_other_hci_event(EventView packet) {
  EventCode event_code = packet.GetEventCode();
  Address address = Address::kEmpty;
  uint32_t connection_handle = bluetooth::os::kUnknownConnectionHandle;
@@ -375,7 +375,7 @@ void log_link_layer_connection_other_hci_event(EventView& packet) {
      static_cast<uint16_t>(reason));
}

void log_link_layer_connection_event_le_meta(LeMetaEventView& le_meta_event_view) {
void log_link_layer_connection_event_le_meta(LeMetaEventView le_meta_event_view) {
  auto le_connection_complete_view = LeConnectionCompleteView::Create(std::move(le_meta_event_view));
  if (!le_connection_complete_view.IsValid()) {
    // function is called for all le meta events. Only need to process le connection complete.
+4 −4
Original line number Diff line number Diff line
@@ -20,11 +20,11 @@

namespace bluetooth {
namespace hci {
void log_link_layer_connection_hci_event(std::unique_ptr<CommandView>& command_view, EventView& packet);
void log_link_layer_connection_hci_event(std::unique_ptr<CommandView>& command_view, EventView packet);
void log_link_layer_connection_command_status(std::unique_ptr<CommandView>& command_view, ErrorCode status);
void log_link_layer_connection_command_complete(EventView& event, std::unique_ptr<CommandView>& command_view);
void log_link_layer_connection_event_le_meta(LeMetaEventView& le_meta_event_view);
void log_link_layer_connection_other_hci_event(EventView& packet);
void log_link_layer_connection_command_complete(EventView event, std::unique_ptr<CommandView>& command_view);
void log_link_layer_connection_event_le_meta(LeMetaEventView le_meta_event_view);
void log_link_layer_connection_other_hci_event(EventView packet);

}  // namespace hci
}  // namespace bluetooth
 No newline at end of file