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

Commit c68f8360 authored by Ryan Prichard's avatar Ryan Prichard
Browse files

Remove use of std::unary_function and std::binary_function

These base classes aren't needed. They were deprecated in C++11 and
removed in C++17. Upstream libc++ has started to omit the declarations
for new-enough C++ modes.

Bug: 175635923
Tag: #gd-refactor
Test: build aosp_oriole-userdebug
Test: atest BluetoothInstrumentationTests
Change-Id: I381c689828f4316fe65bc3d5600b505d08c41e6b
parent 30c877e8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -27,13 +27,13 @@

namespace {

struct IsSpace : std::unary_function<std::string::value_type, bool> {
struct IsSpace {
  bool operator()(std::string::value_type v) {
    return isspace(static_cast<int>(v));
  }
};

struct IsHexDigit : std::unary_function<std::string::value_type, bool> {
struct IsHexDigit {
  bool operator()(std::string::value_type v) {
    return isxdigit(static_cast<int>(v));
  }
+1 −2
Original line number Diff line number Diff line
@@ -436,8 +436,7 @@ class A2dpCodecs {
  void debug_codec_dump(int fd);

 private:
  struct CompareBtBdaddr
      : public std::binary_function<RawAddress, RawAddress, bool> {
  struct CompareBtBdaddr {
    bool operator()(const RawAddress& lhs, const RawAddress& rhs) const {
      return (memcmp(&lhs, &rhs, sizeof(lhs)) < 0);
    }