diff options
author | Elliott Hughes <enh@google.com> | 2018-10-08 11:10:11 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2018-10-08 11:15:52 -0700 |
commit | 643268f325e2bda64248df24913f8b68c842c95a (patch) | |
tree | 4ddf6fdaa71ad280a6df08821c15ce97955a4c64 /libutils/String8.cpp | |
parent | f3186de123c742166ec5e61b27b61af3ef929dfb (diff) |
Move system/core/ off NO_ERROR.
It causes trouble for Windows, and OK already exists.
Bug: N/A
Test: builds
Change-Id: Ida22fd658b0ebb259c710ba39049b07c9e495d9c
Diffstat (limited to 'libutils/String8.cpp')
-rw-r--r-- | libutils/String8.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libutils/String8.cpp b/libutils/String8.cpp index 8d318f77f..0025c5648 100644 --- a/libutils/String8.cpp +++ b/libutils/String8.cpp @@ -230,7 +230,7 @@ status_t String8::setTo(const char* other) const char *newString = allocFromUTF8(other, strlen(other)); SharedBuffer::bufferFromData(mString)->release(); mString = newString; - if (mString) return NO_ERROR; + if (mString) return OK; mString = getEmptyString(); return NO_MEMORY; @@ -241,7 +241,7 @@ status_t String8::setTo(const char* other, size_t len) const char *newString = allocFromUTF8(other, len); SharedBuffer::bufferFromData(mString)->release(); mString = newString; - if (mString) return NO_ERROR; + if (mString) return OK; mString = getEmptyString(); return NO_MEMORY; @@ -252,7 +252,7 @@ status_t String8::setTo(const char16_t* other, size_t len) const char *newString = allocFromUTF16(other, len); SharedBuffer::bufferFromData(mString)->release(); mString = newString; - if (mString) return NO_ERROR; + if (mString) return OK; mString = getEmptyString(); return NO_MEMORY; @@ -263,7 +263,7 @@ status_t String8::setTo(const char32_t* other, size_t len) const char *newString = allocFromUTF32(other, len); SharedBuffer::bufferFromData(mString)->release(); mString = newString; - if (mString) return NO_ERROR; + if (mString) return OK; mString = getEmptyString(); return NO_MEMORY; @@ -274,9 +274,9 @@ status_t String8::append(const String8& other) const size_t otherLen = other.bytes(); if (bytes() == 0) { setTo(other); - return NO_ERROR; + return OK; } else if (otherLen == 0) { - return NO_ERROR; + return OK; } return real_append(other.string(), otherLen); @@ -292,7 +292,7 @@ status_t String8::append(const char* other, size_t otherLen) if (bytes() == 0) { return setTo(other, otherLen); } else if (otherLen == 0) { - return NO_ERROR; + return OK; } return real_append(other, otherLen); @@ -311,7 +311,7 @@ status_t String8::appendFormat(const char* fmt, ...) status_t String8::appendFormatV(const char* fmt, va_list args) { - int n, result = NO_ERROR; + int n, result = OK; va_list tmp_args; /* args is undefined after vsnprintf. @@ -346,7 +346,7 @@ status_t String8::real_append(const char* other, size_t otherLen) str += myLen; memcpy(str, other, otherLen); str[otherLen] = '\0'; - return NO_ERROR; + return OK; } return NO_MEMORY; } @@ -382,7 +382,7 @@ status_t String8::unlockBuffer(size_t size) mString = str; } - return NO_ERROR; + return OK; } ssize_t String8::find(const char* other, size_t start) const |