Fix several compiler warnings:
* Fix [-Wsign-compare] * Fix [-Wc++20-designator]: designated initializers are a C++20 extension * Fix [-Wunused-parameter]
This commit is contained in:
@@ -156,7 +156,7 @@ void Base::UniqueNameManager::addExactName(const std::string& name)
|
||||
baseNameAndDigitCountEntry.Add(digitsValue);
|
||||
}
|
||||
std::string Base::UniqueNameManager::makeUniqueName(const std::string& modelName,
|
||||
int minDigits) const
|
||||
std::size_t minDigits) const
|
||||
{
|
||||
std::string namePrefix;
|
||||
std::string nameSuffix;
|
||||
@@ -169,7 +169,7 @@ std::string Base::UniqueNameManager::makeUniqueName(const std::string& modelName
|
||||
}
|
||||
// We don't care about the digit count of the suggested name, we always use at least the most
|
||||
// digits ever used before.
|
||||
int digitCount = baseNameEntry->second.size() - 1;
|
||||
std::size_t digitCount = baseNameEntry->second.size() - 1;
|
||||
uint digitsValue;
|
||||
if (digitCount < minDigits) {
|
||||
// Caller is asking for more digits than we have in any registered name.
|
||||
|
||||
@@ -344,7 +344,7 @@ public:
|
||||
// name more than once. The effect if undetected is that the second registration will have no
|
||||
// effect
|
||||
void addExactName(const std::string& name);
|
||||
std::string makeUniqueName(const std::string& modelName, int minDigits = 0) const;
|
||||
std::string makeUniqueName(const std::string& modelName, std::size_t minDigits = 0) const;
|
||||
|
||||
// Remove a registered name so it can be generated again.
|
||||
// Nothing happens if you try to remove a non-registered name.
|
||||
|
||||
@@ -790,13 +790,13 @@ RayPickInfo View3DInventor::getObjInfoRay(Base::Vector3d* startvec, Base::Vector
|
||||
// near plane clipping is required to avoid false intersections
|
||||
float near = 0.1;
|
||||
|
||||
RayPickInfo ret = {.isValid = false,
|
||||
.point = Base::Vector3d(),
|
||||
.document = "",
|
||||
.object = "",
|
||||
.parentObject = std::nullopt,
|
||||
.component = std::nullopt,
|
||||
.subName = std::nullopt};
|
||||
RayPickInfo ret = {false,
|
||||
Base::Vector3d(),
|
||||
"",
|
||||
"",
|
||||
std::nullopt,
|
||||
std::nullopt,
|
||||
std::nullopt};
|
||||
SoRayPickAction action(getViewer()->getSoRenderManager()->getViewportRegion());
|
||||
action.setRay(SbVec3f(vsx, vsy, vsz), SbVec3f(vdx, vdy, vdz), near);
|
||||
action.apply(getViewer()->getSoRenderManager()->getSceneGraph());
|
||||
|
||||
@@ -119,6 +119,7 @@ SheetTableView::SheetTableView(QWidget* parent)
|
||||
setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel);
|
||||
|
||||
connect(verticalHeader(), &QWidget::customContextMenuRequested, [this](const QPoint& point) {
|
||||
Q_UNUSED(point)
|
||||
QMenu menu {nullptr};
|
||||
const auto selection = selectionModel()->selectedRows();
|
||||
const auto& [min, max] = selectedMinMaxRows(selection);
|
||||
@@ -145,6 +146,7 @@ SheetTableView::SheetTableView(QWidget* parent)
|
||||
});
|
||||
|
||||
connect(horizontalHeader(), &QWidget::customContextMenuRequested, [this](const QPoint& point) {
|
||||
Q_UNUSED(point)
|
||||
QMenu menu {nullptr};
|
||||
const auto selection = selectionModel()->selectedColumns();
|
||||
const auto& [min, max] = selectedMinMaxColumns(selection);
|
||||
|
||||
Reference in New Issue
Block a user