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

Commit 8b5c8477 authored by Tomasz Wasilczyk's avatar Tomasz Wasilczyk
Browse files

Lock down String8.isEmpty() usage

All users should migrate to .empty()

Bug: 295394788
Test: make checkbuild
Change-Id: I5ec7921b9cf70e6b0857e1087f141dce958d2587
parent 51e3b9cb
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -65,7 +65,6 @@ public:
    inline  size_t              size() const;
    inline  size_t              bytes() const;
    inline  bool                empty() const;
    inline  bool                isEmpty() const;

            size_t              length() const;

@@ -206,6 +205,14 @@ private:
            char*               find_extension(void) const;

            const char* mString;

// These symbols are for potential backward compatibility with prebuilts. To be removed.
#ifdef ENABLE_STRING8_OBSOLETE_METHODS
public:
#else
private:
#endif
    inline  bool                isEmpty() const;
};

// String8 can be trivially moved using memcpy() because moving does not