Prefer empty() over length()

pull/934/head
DeepBlueV7.X 3 years ago committed by GitHub
parent 2a2ef2f2e5
commit b90e39ecb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/CombinedImagePackModel.cpp

@ -60,7 +60,7 @@ CombinedImagePackModel::data(const QModelIndex &index, int role) const
return QStringLiteral(
"<img data-mx-emoticon height=32 src=\"%1\" alt=\"%2\" title=\"%2\">")
.arg(QString::fromStdString(images[index.row()].image.url).toHtmlEscaped(),
images[index.row()].image.body.length() > 0
!images[index.row()].image.body.empty()
? QString::fromStdString(images[index.row()].image.body)
: images[index.row()].shortcode);
case Roles::Url:

Loading…
Cancel
Save