소스 검색

AK: Add copy_to span method for AK::MACAddress

Brian Gianforcaro 4 년 전
부모
커밋
0bb3d83a48
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      AK/MACAddress.h

+ 5 - 0
AK/MACAddress.h

@@ -84,6 +84,11 @@ public:
         return all_of(m_data.begin(), m_data.end(), [](const auto octet) { return octet == 0; });
     }
 
+    void copy_to(Bytes destination) const
+    {
+        m_data.span().copy_to(destination);
+    }
+
 private:
     Array<u8, s_mac_address_length> m_data {};
 };