diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2023-05-27 02:16:31 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2023-05-27 02:16:31 +0200 |
commit | f48c696baf826cc0e2b9dd94c1459c3ae14f835f (patch) | |
tree | 5094aa44eb1b65f99218bb45e938f88c2fc06af2 | |
parent | Fix emoji unicodename in tooltip (diff) | |
download | nheko-f48c696baf826cc0e2b9dd94c1459c3ae14f835f.tar.xz |
Work around ICE on MSVC
See https://developercommunity.visualstudio.com/t/Internal-compile-error-while-compiling-c/1227337 for details...
-rw-r--r-- | src/GridImagePackModel.cpp | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/GridImagePackModel.cpp b/src/GridImagePackModel.cpp index 95cbd265..bd39405e 100644 --- a/src/GridImagePackModel.cpp +++ b/src/GridImagePackModel.cpp @@ -225,10 +225,13 @@ GridImagePackModel::data(const QModelIndex &index, int role) const auto endOffset = std::min((offset + 1) * columns, pack.images.size()); for (std::size_t img = offset * columns; img < endOffset; img++) { const auto &data = pack.images.at(img); - imgs.push_back({.url = QString::fromStdString(data.first.url), - .shortcode = data.second, - .body = QString::fromStdString(data.first.body), - .descriptor_ = std::vector{ + // See + // https://developercommunity.visualstudio.com/t/Internal-compile-error-while-compiling-c/1227337 + imgs.push_back({/*.url =*/QString::fromStdString(data.first.url), + /*.shortcode =*/data.second, + /*.body =*/QString::fromStdString(data.first.body), + /*.descriptor_=*/ + std::vector{ pack.room_id, pack.state_key, data.second.toStdString(), @@ -265,10 +268,13 @@ GridImagePackModel::data(const QModelIndex &index, int role) const currentSearchResult[img].first == firstEntry.first; img++) { const auto &data = pack.images.at(currentSearchResult[img].second); - imgs.push_back({.url = QString::fromStdString(data.first.url), - .shortcode = data.second, - .body = QString::fromStdString(data.first.body), - .descriptor_ = std::vector{ + // See + // https://developercommunity.visualstudio.com/t/Internal-compile-error-while-compiling-c/1227337 + imgs.push_back({/*.url = */ QString::fromStdString(data.first.url), + /*.shortcode = */ data.second, + /*.body = */ QString::fromStdString(data.first.body), + /*.descriptor_ = */ + std::vector{ pack.room_id, pack.state_key, data.second.toStdString(), |