Loading cmds/atrace/atrace.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -796,7 +796,7 @@ static bool setCategoriesEnableFromFile(const char* categories_file) bool ok = true; while (!tokenizer->isEol()) { String8 token = tokenizer->nextToken(" "); if (token.isEmpty()) { if (token.empty()) { tokenizer->skipDelimiters(" "); continue; } Loading libs/gui/tests/GLTest.cpp +8 −8 Original line number Diff line number Diff line Loading @@ -191,24 +191,24 @@ EGLSurface GLTest::createWindowSurface(EGLDisplay display, EGLConfig config, msg += String8::format("r(%d isn't %d)", pixel[0], r); } if (g >= 0 && abs(g - int(pixel[1])) > tolerance) { if (!msg.isEmpty()) { if (!msg.empty()) { msg += " "; } msg += String8::format("g(%d isn't %d)", pixel[1], g); } if (b >= 0 && abs(b - int(pixel[2])) > tolerance) { if (!msg.isEmpty()) { if (!msg.empty()) { msg += " "; } msg += String8::format("b(%d isn't %d)", pixel[2], b); } if (a >= 0 && abs(a - int(pixel[3])) > tolerance) { if (!msg.isEmpty()) { if (!msg.empty()) { msg += " "; } msg += String8::format("a(%d isn't %d)", pixel[3], a); } if (!msg.isEmpty()) { if (!msg.empty()) { return ::testing::AssertionFailure(::testing::Message(msg.c_str())); } else { return ::testing::AssertionSuccess(); Loading @@ -223,24 +223,24 @@ EGLSurface GLTest::createWindowSurface(EGLDisplay display, EGLConfig config, msg += String8::format("left(%d isn't %d)", r1.left, r2.left); } if (abs(r1.top - r2.top) > tolerance) { if (!msg.isEmpty()) { if (!msg.empty()) { msg += " "; } msg += String8::format("top(%d isn't %d)", r1.top, r2.top); } if (abs(r1.right - r2.right) > tolerance) { if (!msg.isEmpty()) { if (!msg.empty()) { msg += " "; } msg += String8::format("right(%d isn't %d)", r1.right, r2.right); } if (abs(r1.bottom - r2.bottom) > tolerance) { if (!msg.isEmpty()) { if (!msg.empty()) { msg += " "; } msg += String8::format("bottom(%d isn't %d)", r1.bottom, r2.bottom); } if (!msg.isEmpty()) { if (!msg.empty()) { msg += String8::format(" R1: [%d %d %d %d] R2: [%d %d %d %d]", r1.left, r1.top, r1.right, r1.bottom, r2.left, r2.top, r2.right, r2.bottom); Loading libs/input/KeyCharacterMap.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -1247,7 +1247,7 @@ status_t KeyCharacterMap::Parser::parseCharacterLiteral(char16_t* outCharacter) } // Ensure that we consumed the entire token. if (mTokenizer->nextToken(WHITESPACE).isEmpty()) { if (mTokenizer->nextToken(WHITESPACE).empty()) { return NO_ERROR; } Loading libs/input/PropertyMap.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -171,7 +171,7 @@ status_t PropertyMap::Parser::parse() { if (!mTokenizer->isEol() && mTokenizer->peekChar() != '#') { String8 keyToken = mTokenizer->nextToken(WHITESPACE_OR_PROPERTY_DELIMITER); if (keyToken.isEmpty()) { if (keyToken.empty()) { ALOGE("%s: Expected non-empty property key.", mTokenizer->getLocation().c_str()); return BAD_VALUE; } Loading libs/input/VirtualKeyMap.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -146,7 +146,7 @@ bool VirtualKeyMap::Parser::parseNextIntField(int32_t* outValue) { String8 token = mTokenizer->nextToken(WHITESPACE_OR_FIELD_DELIMITER); char* end; *outValue = strtol(token.c_str(), &end, 0); if (token.isEmpty() || *end != '\0') { if (token.empty() || *end != '\0') { ALOGE("Expected an integer, got '%s'.", token.c_str()); return false; } Loading Loading
cmds/atrace/atrace.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -796,7 +796,7 @@ static bool setCategoriesEnableFromFile(const char* categories_file) bool ok = true; while (!tokenizer->isEol()) { String8 token = tokenizer->nextToken(" "); if (token.isEmpty()) { if (token.empty()) { tokenizer->skipDelimiters(" "); continue; } Loading
libs/gui/tests/GLTest.cpp +8 −8 Original line number Diff line number Diff line Loading @@ -191,24 +191,24 @@ EGLSurface GLTest::createWindowSurface(EGLDisplay display, EGLConfig config, msg += String8::format("r(%d isn't %d)", pixel[0], r); } if (g >= 0 && abs(g - int(pixel[1])) > tolerance) { if (!msg.isEmpty()) { if (!msg.empty()) { msg += " "; } msg += String8::format("g(%d isn't %d)", pixel[1], g); } if (b >= 0 && abs(b - int(pixel[2])) > tolerance) { if (!msg.isEmpty()) { if (!msg.empty()) { msg += " "; } msg += String8::format("b(%d isn't %d)", pixel[2], b); } if (a >= 0 && abs(a - int(pixel[3])) > tolerance) { if (!msg.isEmpty()) { if (!msg.empty()) { msg += " "; } msg += String8::format("a(%d isn't %d)", pixel[3], a); } if (!msg.isEmpty()) { if (!msg.empty()) { return ::testing::AssertionFailure(::testing::Message(msg.c_str())); } else { return ::testing::AssertionSuccess(); Loading @@ -223,24 +223,24 @@ EGLSurface GLTest::createWindowSurface(EGLDisplay display, EGLConfig config, msg += String8::format("left(%d isn't %d)", r1.left, r2.left); } if (abs(r1.top - r2.top) > tolerance) { if (!msg.isEmpty()) { if (!msg.empty()) { msg += " "; } msg += String8::format("top(%d isn't %d)", r1.top, r2.top); } if (abs(r1.right - r2.right) > tolerance) { if (!msg.isEmpty()) { if (!msg.empty()) { msg += " "; } msg += String8::format("right(%d isn't %d)", r1.right, r2.right); } if (abs(r1.bottom - r2.bottom) > tolerance) { if (!msg.isEmpty()) { if (!msg.empty()) { msg += " "; } msg += String8::format("bottom(%d isn't %d)", r1.bottom, r2.bottom); } if (!msg.isEmpty()) { if (!msg.empty()) { msg += String8::format(" R1: [%d %d %d %d] R2: [%d %d %d %d]", r1.left, r1.top, r1.right, r1.bottom, r2.left, r2.top, r2.right, r2.bottom); Loading
libs/input/KeyCharacterMap.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -1247,7 +1247,7 @@ status_t KeyCharacterMap::Parser::parseCharacterLiteral(char16_t* outCharacter) } // Ensure that we consumed the entire token. if (mTokenizer->nextToken(WHITESPACE).isEmpty()) { if (mTokenizer->nextToken(WHITESPACE).empty()) { return NO_ERROR; } Loading
libs/input/PropertyMap.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -171,7 +171,7 @@ status_t PropertyMap::Parser::parse() { if (!mTokenizer->isEol() && mTokenizer->peekChar() != '#') { String8 keyToken = mTokenizer->nextToken(WHITESPACE_OR_PROPERTY_DELIMITER); if (keyToken.isEmpty()) { if (keyToken.empty()) { ALOGE("%s: Expected non-empty property key.", mTokenizer->getLocation().c_str()); return BAD_VALUE; } Loading
libs/input/VirtualKeyMap.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -146,7 +146,7 @@ bool VirtualKeyMap::Parser::parseNextIntField(int32_t* outValue) { String8 token = mTokenizer->nextToken(WHITESPACE_OR_FIELD_DELIMITER); char* end; *outValue = strtol(token.c_str(), &end, 0); if (token.isEmpty() || *end != '\0') { if (token.empty() || *end != '\0') { ALOGE("Expected an integer, got '%s'.", token.c_str()); return false; } Loading