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

Commit 5dd2bd7e authored by David Duarte's avatar David Duarte
Browse files

RootCanal: Remove usage of libbase in uuid



Tag: #testing
Test: m root-canal
Change-Id: Ib62b7122a99b5059c0beea6a6b71bde7af342c5d
Signed-off-by: default avatarDavid Duarte <licorne@google.com>
parent 394bdcc1
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@

#include "uuid.h"

#include <base/strings/stringprintf.h>
#include <algorithm>
#include <random>

@@ -168,8 +167,14 @@ bool Uuid::operator!=(const Uuid& rhs) const {
}

std::string Uuid::ToString() const {
  return base::StringPrintf("%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x", uu[0], uu[1], uu[2],
                            uu[3], uu[4], uu[5], uu[6], uu[7], uu[8], uu[9], uu[10], uu[11], uu[12], uu[13], uu[14],
                            uu[15]);
  char buffer[37];

  snprintf(
      buffer, sizeof(buffer),
      "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x",
      uu[0], uu[1], uu[2], uu[3], uu[4], uu[5], uu[6], uu[7], uu[8], uu[9],
      uu[10], uu[11], uu[12], uu[13], uu[14], uu[15]);

  return buffer;
}
}  // namespace bluetooth
 No newline at end of file