Fix a C++17 warning

This commit is contained in:
Joachim Schmitz 2020-10-02 13:35:44 +02:00 committed by Igor Korsukov
parent df89cd96d7
commit 8da9191281

View file

@ -112,7 +112,7 @@ Palette::Palette(std::unique_ptr<PalettePanel> pp, QWidget* parent)
const auto allCells = pp->takeCells(0, pp->ncells());
for (const PaletteCellPtr& cell : allCells) {
Element* e = cell.unique() ? cell->element.release() : (cell->element ? cell->element->clone() : nullptr);
Element* e = (cell.use_count() == 1) ? cell->element.release() : (cell->element ? cell->element->clone() : nullptr);
if (e) {
PaletteCell* newCell = append(e, cell->name, cell->tag, cell->mag);
newCell->drawStaff = cell->drawStaff;