Use the empty()
method to check for emptiness instead of length()
PiperOrigin-RevId: 566247438 Change-Id: I8199ef53310a057abbe23f8f4295507b60d6b707
This commit is contained in:
parent
d1467f5813
commit
8be20cce69
@ -336,7 +336,7 @@ bool FilePath::CreateDirectoriesRecursively() const {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pathname_.length() == 0 || this->DirectoryExists()) {
|
if (pathname_.empty() || this->DirectoryExists()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5400,7 +5400,7 @@ void UnitTest::RecordProperty(const std::string& key,
|
|||||||
int UnitTest::Run() {
|
int UnitTest::Run() {
|
||||||
#ifdef GTEST_HAS_DEATH_TEST
|
#ifdef GTEST_HAS_DEATH_TEST
|
||||||
const bool in_death_test_child_process =
|
const bool in_death_test_child_process =
|
||||||
GTEST_FLAG_GET(internal_run_death_test).length() > 0;
|
!GTEST_FLAG_GET(internal_run_death_test).empty();
|
||||||
|
|
||||||
// Google Test implements this protocol for catching that a test
|
// Google Test implements this protocol for catching that a test
|
||||||
// program exits before returning control to Google Test:
|
// program exits before returning control to Google Test:
|
||||||
|
Loading…
Reference in New Issue
Block a user