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

Commit 4635369a authored by Yi Kong's avatar Yi Kong Committed by android-build-merger
Browse files

Merge "[binder] Modernize codebase by replacing NULL with nullptr" am:...

Merge "[binder] Modernize codebase by replacing NULL with nullptr" am: 8978c7c1 am: 0a3c8477 am: fb93cf7c
am: 6b3f6cad

Change-Id: I91ede3c3407dac37c269a568be864b5e4bfb51a2
parents 2631409e 6b3f6cad
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -229,7 +229,7 @@ int32_t Value::parcelType() const
#ifdef LIBBINDER_VALUE_SUPPORTS_TYPE_INFO
#ifdef LIBBINDER_VALUE_SUPPORTS_TYPE_INFO
const std::type_info& Value::type() const
const std::type_info& Value::type() const
{
{
    return mContent != NULL
    return mContent != nullptr
        ? mContent->type()
        ? mContent->type()
        : typeid(void);
        : typeid(void);
}
}
@@ -306,7 +306,7 @@ status_t Value::writeToParcel(Parcel* parcel) const


#define BEGIN_HANDLE_WRITE()                                                                      \
#define BEGIN_HANDLE_WRITE()                                                                      \
    do {                                                                                          \
    do {                                                                                          \
        const void* t_info(mContent?mContent->type_ptr():NULL);                                   \
        const void* t_info(mContent?mContent->type_ptr():nullptr);                                \
        if (false) { }
        if (false) { }
#define HANDLE_WRITE_TYPE(T, TYPEVAL, TYPEMETHOD)                                                 \
#define HANDLE_WRITE_TYPE(T, TYPEVAL, TYPEMETHOD)                                                 \
    else if (t_info == internal_type_ptr<T>()) {                                                  \
    else if (t_info == internal_type_ptr<T>()) {                                                  \
+2 −2
Original line number Original line Diff line number Diff line
@@ -96,11 +96,11 @@ public: \
            const ::android::sp<::android::IBinder>& obj)               \
            const ::android::sp<::android::IBinder>& obj)               \
    {                                                                   \
    {                                                                   \
        ::android::sp<I##INTERFACE> intr;                               \
        ::android::sp<I##INTERFACE> intr;                               \
        if (obj != NULL) {                                              \
        if (obj != nullptr) {                                           \
            intr = static_cast<I##INTERFACE*>(                          \
            intr = static_cast<I##INTERFACE*>(                          \
                obj->queryLocalInterface(                               \
                obj->queryLocalInterface(                               \
                        I##INTERFACE::descriptor).get());               \
                        I##INTERFACE::descriptor).get());               \
            if (intr == NULL) {                                         \
            if (intr == nullptr) {                                      \
                intr = new Bp##INTERFACE(obj);                          \
                intr = new Bp##INTERFACE(obj);                          \
            }                                                           \
            }                                                           \
        }                                                               \
        }                                                               \