chore: prefer empty() check for readability (#26109)
This commit is contained in:
parent
d9db9873fd
commit
554ad93d45
11 changed files with 15 additions and 15 deletions
|
@ -148,7 +148,7 @@ int AutofillPopup::GetDesiredPopupWidth() {
|
|||
kEndPadding + 2 * kPopupBorderThickness +
|
||||
gfx::GetStringWidth(GetValueAt(i), GetValueFontListForRow(i)) +
|
||||
gfx::GetStringWidth(GetLabelAt(i), GetLabelFontListForRow(i));
|
||||
if (GetLabelAt(i).length() > 0)
|
||||
if (!GetLabelAt(i).empty())
|
||||
row_size += kNamePadding + kEndPadding;
|
||||
|
||||
popup_width = std::max(popup_width, row_size);
|
||||
|
|
|
@ -161,7 +161,7 @@ DialogResult ShowTaskDialogUTF16(NativeWindow* parent,
|
|||
} else {
|
||||
MapToCommonID(buttons, &id_map, &config.dwCommonButtons, &dialog_buttons);
|
||||
}
|
||||
if (dialog_buttons.size() > 0) {
|
||||
if (!dialog_buttons.empty()) {
|
||||
config.pButtons = &dialog_buttons.front();
|
||||
config.cButtons = dialog_buttons.size();
|
||||
if (!no_link)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue