Lock down String8.isEmpty() usage

All users should migrate to .empty()

Bug: 295394788
Test: make checkbuild
Change-Id: I5ec7921b9cf70e6b0857e1087f141dce958d2587
This commit is contained in:
Tomasz Wasilczyk 2023-08-14 18:20:02 +00:00
parent 51e3b9cbca
commit 8b5c8477f9

View file

@ -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