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

Commit 8978c7c1 authored by Yi Kong's avatar Yi Kong Committed by Gerrit Code Review
Browse files

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

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

#define BEGIN_HANDLE_WRITE()                                                                      \
    do {                                                                                          \
        const void* t_info(mContent?mContent->type_ptr():NULL);                                   \
        const void* t_info(mContent?mContent->type_ptr():nullptr);                                \
        if (false) { }
#define HANDLE_WRITE_TYPE(T, TYPEVAL, TYPEMETHOD)                                                 \
    else if (t_info == internal_type_ptr<T>()) {                                                  \
+3 −3
Original line number Diff line number Diff line
@@ -40,13 +40,13 @@ public:
                                    uint32_t flags = 0);

    virtual status_t    linkToDeath(const sp<DeathRecipient>& recipient,
                                    void* cookie = NULL,
                                    void* cookie = nullptr,
                                    uint32_t flags = 0);

    virtual status_t    unlinkToDeath(  const wp<DeathRecipient>& recipient,
                                        void* cookie = NULL,
                                        void* cookie = nullptr,
                                        uint32_t flags = 0,
                                        wp<DeathRecipient>* outRecipient = NULL);
                                        wp<DeathRecipient>* outRecipient = nullptr);

    virtual void        attachObject(   const void* objectID,
                                        void* object,
+3 −3
Original line number Diff line number Diff line
@@ -47,12 +47,12 @@ public:
                                    uint32_t flags = 0);

    virtual status_t    linkToDeath(const sp<DeathRecipient>& recipient,
                                    void* cookie = NULL,
                                    void* cookie = nullptr,
                                    uint32_t flags = 0);
    virtual status_t    unlinkToDeath(  const wp<DeathRecipient>& recipient,
                                        void* cookie = NULL,
                                        void* cookie = nullptr,
                                        uint32_t flags = 0,
                                        wp<DeathRecipient>* outRecipient = NULL);
                                        wp<DeathRecipient>* outRecipient = nullptr);

    virtual void        attachObject(   const void* objectID,
                                        void* object,
+2 −2
Original line number Diff line number Diff line
@@ -31,12 +31,12 @@ const char* stringForIndent(int32_t indentLevel);
typedef void (*debugPrintFunc)(void* cookie, const char* txt);

void printTypeCode(uint32_t typeCode,
    debugPrintFunc func = 0, void* cookie = 0);
    debugPrintFunc func = nullptr, void* cookie = nullptr);

void printHexData(int32_t indent, const void *buf, size_t length,
    size_t bytesPerLine=16, int32_t singleLineBytesCutoff=16,
    size_t alignment=0, bool cArrayStyle=false,
    debugPrintFunc func = 0, void* cookie = 0);
    debugPrintFunc func = nullptr, void* cookie = nullptr);


ssize_t getBinderKernelReferences(size_t count, uintptr_t* buf);
+3 −3
Original line number Diff line number Diff line
@@ -132,7 +132,7 @@ public:
     * directly do with it now that it has passed on.)
     */
    virtual status_t        linkToDeath(const sp<DeathRecipient>& recipient,
                                        void* cookie = NULL,
                                        void* cookie = nullptr,
                                        uint32_t flags = 0) = 0;

    /**
@@ -143,9 +143,9 @@ public:
     * added with that cookie will be unlinked.
     */
    virtual status_t        unlinkToDeath(  const wp<DeathRecipient>& recipient,
                                            void* cookie = NULL,
                                            void* cookie = nullptr,
                                            uint32_t flags = 0,
                                            wp<DeathRecipient>* outRecipient = NULL) = 0;
                                            wp<DeathRecipient>* outRecipient = nullptr) = 0;

    virtual bool            checkSubclass(const void* subclassID) const;

Loading