From 23413a4d12ad070c8a356c5a3186f81def705c54 Mon Sep 17 00:00:00 2001 From: gatecat Date: Thu, 25 Feb 2021 11:21:39 +0000 Subject: Fix compiler warnings introduced by -Wextra Signed-off-by: gatecat --- gui/fpgaviewwidget.h | 2 ++ gui/quadtree.h | 2 -- gui/treemodel.h | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'gui') diff --git a/gui/fpgaviewwidget.h b/gui/fpgaviewwidget.h index 9f670cb0..7a2994f6 100644 --- a/gui/fpgaviewwidget.h +++ b/gui/fpgaviewwidget.h @@ -202,6 +202,8 @@ class FPGAViewWidget : public QOpenGLWidget, protected QOpenGLFunctions } } + PickedElement &operator=(const PickedElement &other) = default; + DecalXY decal(Context *ctx) const { DecalXY decal; diff --git a/gui/quadtree.h b/gui/quadtree.h index 5bbd2ebb..49749a68 100644 --- a/gui/quadtree.h +++ b/gui/quadtree.h @@ -52,8 +52,6 @@ template class QuadTreeNode BoundingBox() : x0_(pinf), y0_(pinf), x1_(ninf), y1_(ninf) {} - BoundingBox(const BoundingBox &other) : x0_(other.x0_), y0_(other.y0_), x1_(other.x1_), y1_(other.y1_) {} - // Whether a bounding box contains a given points. // A point is defined to be in a bounding box when it's not lesser than // the lower coordinate or greater than the higher coordinate, eg: diff --git a/gui/treemodel.h b/gui/treemodel.h index 7b599e65..e9c42a0f 100644 --- a/gui/treemodel.h +++ b/gui/treemodel.h @@ -218,7 +218,7 @@ template class ElementList : public Item name.remove(0, prefix.size()); auto item = new IdStringItem(ctx_, idstring, this, child_type_); - managed_[idstring] = std::move(std::unique_ptr(item)); + managed_[idstring] = std::unique_ptr(item); } } @@ -306,7 +306,7 @@ template class ElementXYRoot : public Item // Create X list Item. auto item = new Item(QString("X%1").arg(i), this); - managed_labels_.push_back(std::move(std::unique_ptr(item))); + managed_labels_.push_back(std::unique_ptr(item)); for (auto j : y_present) { // Create Y list ElementList. @@ -314,7 +314,7 @@ template class ElementXYRoot : public Item new ElementList(ctx_, QString("Y%1").arg(j), item, &map_, i, j, getter_, child_type_); // Pre-populate list with one element, other Qt will never ask for more. item2->fetchMore(1); - managed_lists_.push_back(std::move(std::unique_ptr>(item2))); + managed_lists_.push_back(std::unique_ptr>(item2)); } } } -- cgit v1.2.3