Skip to content

Commit

Permalink
fixing warnings and typos #22 #3
Browse files Browse the repository at this point in the history
  • Loading branch information
behrisch committed Feb 13, 2025
1 parent 7534763 commit c1e58d9
Show file tree
Hide file tree
Showing 14 changed files with 35 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/gui/GUIApplicationWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ std::mt19937 GUIApplicationWindow::myGamingRNG;
// ===========================================================================
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4355) // mask warning about "this" in intializers
#pragma warning(disable: 4355) // mask warning about "this" in initializers
#endif
GUIApplicationWindow::GUIApplicationWindow(FXApp* a, const std::string& configPattern) :
GUIMainWindow(a),
Expand Down
9 changes: 8 additions & 1 deletion src/gui/dialogs/GUIDialog_Breakpoints.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,14 @@ FXDEFMAP(GUIDialog_Breakpoints) GUIDialog_BreakpointsMap[] = {

FXIMPLEMENT(GUIDialog_Breakpoints, FXMainWindow, GUIDialog_BreakpointsMap, ARRAYNUMBER(GUIDialog_BreakpointsMap))


// ===========================================================================
// method definitions
// ===========================================================================

#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4355) // mask warning about "this" in initializers
#endif
GUIDialog_Breakpoints::GUIDialog_Breakpoints(GUIApplicationWindow* parent, std::vector<SUMOTime>& breakpoints, FXMutex& breakpointLock, const SUMOTime simBegin) :
FXMainWindow(parent->getApp(), TL("Breakpoints Editor"), GUIIconSubSys::getIcon(GUIIcon::APP_BREAKPOINTS), nullptr, GUIDesignChooserDialog),
GUIPersistentWindowPos(this, "DIALOG_BREAKPOINTS", true, 20, 40, 300, 350),
Expand Down Expand Up @@ -104,6 +108,9 @@ GUIDialog_Breakpoints::GUIDialog_Breakpoints(GUIApplicationWindow* parent, std::
create();
show();
}
#ifdef _MSC_VER
#pragma warning(pop)
#endif


GUIDialog_Breakpoints::~GUIDialog_Breakpoints() {
Expand Down
1 change: 1 addition & 0 deletions src/gui/dialogs/GUIDialog_Breakpoints.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ class GUIDialog_Breakpoints : public FXMainWindow, public GUIPersistentWindowPos

/// @brief sets the focus after the window is created
void show();
using FXMainWindow::show; // to silence the warning C4266 about a hidden function

/// @name FOX-callbacks
/// @{
Expand Down
14 changes: 14 additions & 0 deletions src/netedit/GNEViewNet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,10 @@ FXIMPLEMENT(GNEViewNet, GUISUMOAbstractView, GNEViewNetMap, ARRAYNUMBER(GNEViewN
// ===========================================================================
// member method definitions
// ===========================================================================
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4355) // mask warning about "this" in initializers
#endif
GNEViewNet::GNEViewNet(FXComposite* tmpParent, FXComposite* actualParent, GUIMainWindow& app,
GNEViewParent* viewParent, GNENet* net, GNEUndoList* undoList,
FXGLVisual* glVis, FXGLCanvas* share) :
Expand Down Expand Up @@ -299,6 +303,9 @@ GNEViewNet::GNEViewNet(FXComposite* tmpParent, FXComposite* actualParent, GUIMai
myDemandViewOptions.menuCheckToggleDrawJunctionShape->setChecked(hide);
myDataViewOptions.menuCheckToggleDrawJunctionShape->setChecked(hide);
}
#ifdef _MSC_VER
#pragma warning(pop)
#endif


GNEViewNet::~GNEViewNet() {
Expand Down Expand Up @@ -1188,6 +1195,10 @@ GNEViewNet::removeRestrictedLane(GNELane* lane, SUMOVehicleClass vclass) {
}


#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4355) // mask warning about "this" in initializers
#endif
GNEViewNet::GNEViewNet() :
myViewObjectsSelector(this),
myEditModes(this),
Expand All @@ -1210,6 +1221,9 @@ GNEViewNet::GNEViewNet() :
myEditNetworkElementShapes(this),
myLockManager(this) {
}
#ifdef _MSC_VER
#pragma warning(pop)
#endif


std::vector<std::string>
Expand Down
3 changes: 2 additions & 1 deletion src/osgview/GUIOSGView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ GUIOSGView::GUIOSGView(
GUINet& net, FXGLVisual* glVis,
FXGLCanvas* share) :
GUISUMOAbstractView(p, app, parent, net.getVisualisationSpeedUp(), glVis, share),
myTracked(0), myCameraManipulator(new GUIOSGManipulator(this)), myLastUpdate(-1),
myTracked(0), myLastUpdate(-1),
myOSGNormalizedCursorX(0.), myOSGNormalizedCursorY(0.) {
if (myChanger != nullptr) {
delete (myChanger);
Expand All @@ -147,6 +147,7 @@ GUIOSGView::GUIOSGView(
int h = getHeight();
myAdapter = new FXOSGAdapter(this, new FXCursor(parent->getApp(), CURSOR_CROSS));
myViewer = new osgViewer::Viewer();
myCameraManipulator = new GUIOSGManipulator(this);
myChanger = new GUIOSGPerspectiveChanger(*this, *myGrid);
const char* sumoPath = getenv("SUMO_HOME");
if (sumoPath != 0) {
Expand Down
1 change: 1 addition & 0 deletions src/osgview/GUIOSGView.h
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ class GUIOSGView : public GUISUMOAbstractView {
public:
PickHandler(GUIOSGView* parent) : myParent(parent), myDrag(false) {};
bool handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa);
using osgGA::GUIEventHandler::handle; // to silence the warning C4266 about a hidden function
protected:
~PickHandler() {};
private:
Expand Down
2 changes: 1 addition & 1 deletion src/utils/gui/div/GUIDialog_GLChosenEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ FXIMPLEMENT(GUIDialog_GLChosenEditor, FXMainWindow, GUIDialog_GLChosenEditorMap,
// ===========================================================================
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4355) // mask warning about "this" in intializers
#pragma warning(disable: 4355) // mask warning about "this" in initializers
#endif
GUIDialog_GLChosenEditor::GUIDialog_GLChosenEditor(GUIMainWindow* parent, GUISelectedStorage* str) :
FXMainWindow(parent->getApp(), "List of Selected Items", GUIIconSubSys::getIcon(GUIIcon::APP_SELECTOR), nullptr, GUIDesignChooserDialog),
Expand Down
1 change: 1 addition & 0 deletions src/utils/gui/windows/GUIDanielPerspectiveChanger.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ class GUIDanielPerspectiveChanger : public GUIPerspectiveChanger {

/** @brief Sets the viewport */
void setViewport(double zoom, double xPos, double yPos);
using GUIPerspectiveChanger::setViewport; // to silence the warning C4266 about a hidden function

/// @brief Alternative method for setting the viewport
void setViewportFrom(double xPos, double yPos, double zPos);
Expand Down
2 changes: 1 addition & 1 deletion src/utils/gui/windows/GUIDialog_ChooserAbstract.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ FXIMPLEMENT(GUIDialog_ChooserAbstract, FXMainWindow, GUIDialog_ChooserAbstractMa
// ===========================================================================
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4355) // mask warning about "this" in intializers
#pragma warning(disable: 4355) // mask warning about "this" in initializers
#endif
GUIDialog_ChooserAbstract::GUIDialog_ChooserAbstract(GUIGlChildWindow* windowsParent, int messageId,
FXIcon* icon, const FXString& title, const std::vector<GUIGlID>& ids, GUIGlObjectStorage& /*glStorage*/) :
Expand Down
1 change: 1 addition & 0 deletions src/utils/gui/windows/GUIDialog_ChooserAbstract.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ class GUIDialog_ChooserAbstract : public FXMainWindow, public GUIPersistentWindo

/// @brief sets the focus after the window is created to work-around bug in libfox
void show();
using FXMainWindow::show; // to silence the warning C4266 about a hidden function

int getMessageId() const {
return myMessageId;
Expand Down
2 changes: 1 addition & 1 deletion src/utils/gui/windows/GUIDialog_EditViewport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ FXIMPLEMENT(GUIDialog_EditViewport, FXDialogBox, GUIDialog_EditViewportMap, ARRA

#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4355) // mask warning about "this" in intializers
#pragma warning(disable: 4355) // mask warning about "this" in initializers
#endif
GUIDialog_EditViewport::GUIDialog_EditViewport(GUISUMOAbstractView* parent, const char* name) :
FXDialogBox(parent, name, GUIDesignDialogBox, 0, 0, 0, 0, 0, 0, 0, 0),
Expand Down
1 change: 1 addition & 0 deletions src/utils/gui/windows/GUIDialog_EditViewport.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class GUIDialog_EditViewport : public FXDialogBox, public GUIPersistentWindowPos

/// @brief overload show function to focus always in OK Button
void show();
using FXDialogBox::show; // to silence the warning C4266 about a hidden function

/// @name FOX-callbacks
/// @{
Expand Down
1 change: 1 addition & 0 deletions src/utils/gui/windows/GUIDialog_ViewSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ class GUIDialog_ViewSettings : public FXDialogBox, public GUIPersistentWindowPos

/// @brief show view settings dialog
void show();
using FXDialogBox::show; // to silence the warning C4266 about a hidden function

/// @brief get GUISUMOAbstractView parent
GUISUMOAbstractView* getSUMOAbstractView();
Expand Down
2 changes: 1 addition & 1 deletion src/utils/traction_wire/Circuit.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#ifdef HAVE_EIGEN
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4464 5031)
#pragma warning(disable: 4127 4464 5031)
#endif
// avoid warnings in clang
#ifdef __clang__
Expand Down

0 comments on commit c1e58d9

Please sign in to comment.