chore: prefer empty() check for readability (#29360)
This commit is contained in:
parent
77ecc7d432
commit
9bb7051f54
4 changed files with 5 additions and 6 deletions
|
@ -58,7 +58,7 @@ bool GetChildNode(const base::DictionaryValue* root,
|
|||
const std::string& name,
|
||||
const base::DictionaryValue* dir,
|
||||
const base::DictionaryValue** out) {
|
||||
if (name == "") {
|
||||
if (name.empty()) {
|
||||
*out = root;
|
||||
return true;
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ bool GetChildNode(const base::DictionaryValue* root,
|
|||
bool GetNodeFromPath(std::string path,
|
||||
const base::DictionaryValue* root,
|
||||
const base::DictionaryValue** out) {
|
||||
if (path == "") {
|
||||
if (path.empty()) {
|
||||
*out = root;
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue