MSVC: fix compiler warnings
This commit is contained in:
@@ -303,7 +303,7 @@ QWidget* setupMainWindow()
|
||||
try {
|
||||
Gui::initGuiAppPostMainWindow(true, *qApp, *mw, nullptr);
|
||||
}
|
||||
catch (const Base::Exception& e) {
|
||||
catch (const Base::Exception&) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -3067,7 +3067,7 @@ App::Color CDxfRead::ObjectColor(ColorIndex_t index)
|
||||
result = App::Color(brightness, brightness, brightness);
|
||||
}
|
||||
else {
|
||||
static const std::array<float, 5> fades = {1.00, 0.74, 0.50, 0.40, 0.30};
|
||||
static const std::array<float, 5> fades = {1.00F, 0.74F, 0.50F, 0.40F, 0.30F};
|
||||
return wheel(index / 10 - 1, (index & 1) != 0 ? 0.69 : 0, fades[(index / 2) % 5]);
|
||||
}
|
||||
// TODO: These colors are modified to contrast with the background. In the original program
|
||||
|
||||
@@ -476,7 +476,7 @@ void ModelSelect::onSelectModel(const QItemSelection& selected, const QItemSelec
|
||||
ui->standardButtons->button(QDialogButtonBox::Ok)->setEnabled(true);
|
||||
ui->buttonFavorite->setEnabled(true);
|
||||
}
|
||||
catch (const std::exception& e) {
|
||||
catch (const std::exception&) {
|
||||
_selected = QString::fromStdString("");
|
||||
clearMaterialModel();
|
||||
ui->standardButtons->button(QDialogButtonBox::Ok)->setEnabled(false);
|
||||
|
||||
@@ -135,9 +135,6 @@
|
||||
<property name="text">
|
||||
<string>In x-direction:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>labelOffset</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
|
||||
@@ -71,7 +71,7 @@ App::DocumentObjectExecReturn* Feature::recompute()
|
||||
return StdReturn;
|
||||
}
|
||||
}
|
||||
catch (Base::Exception& e) {
|
||||
catch (Base::Exception&) {
|
||||
//invalid BaseShape
|
||||
Suppressed.setValue(false);
|
||||
}
|
||||
|
||||
@@ -27,6 +27,10 @@
|
||||
#include <boost/math/constants/constants.hpp>
|
||||
#include "../../SketcherGlobal.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable : 4251)
|
||||
#endif
|
||||
|
||||
namespace GCS
|
||||
{
|
||||
class SketcherExport Point
|
||||
|
||||
@@ -241,6 +241,8 @@ public:
|
||||
return isEndPointSelected;
|
||||
case Sketcher::PointPos::mid:
|
||||
return isMidPointSelected;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1099,7 +1099,7 @@ QGraphicsItem *QGIViewPart::getQGISubItemByName(const std::string &subName) cons
|
||||
scanType = QGIFace::Type;
|
||||
}
|
||||
}
|
||||
catch (Base::ValueError& e) {
|
||||
catch (Base::ValueError&) {
|
||||
// No action
|
||||
}
|
||||
if (!scanType) {
|
||||
@@ -1110,7 +1110,7 @@ QGraphicsItem *QGIViewPart::getQGISubItemByName(const std::string &subName) cons
|
||||
try {
|
||||
scanIndex = TechDraw::DrawUtil::getIndexFromName(subName);
|
||||
}
|
||||
catch (Base::ValueError& e) {
|
||||
catch (Base::ValueError&) {
|
||||
// No action
|
||||
}
|
||||
if (scanIndex < 0) {
|
||||
|
||||
Reference in New Issue
Block a user