Fix a C++17 warning
This commit is contained in:
parent
df89cd96d7
commit
8da9191281
1 changed files with 1 additions and 1 deletions
|
@ -112,7 +112,7 @@ Palette::Palette(std::unique_ptr<PalettePanel> pp, QWidget* parent)
|
||||||
|
|
||||||
const auto allCells = pp->takeCells(0, pp->ncells());
|
const auto allCells = pp->takeCells(0, pp->ncells());
|
||||||
for (const PaletteCellPtr& cell : allCells) {
|
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) {
|
if (e) {
|
||||||
PaletteCell* newCell = append(e, cell->name, cell->tag, cell->mag);
|
PaletteCell* newCell = append(e, cell->name, cell->tag, cell->mag);
|
||||||
newCell->drawStaff = cell->drawStaff;
|
newCell->drawStaff = cell->drawStaff;
|
||||||
|
|
Loading…
Reference in a new issue