diff --git a/.gitignore b/.gitignore index 92d0697d9e..2da79dcd5a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,5 @@ # Build and editor thing -/build/ -/build-ninja/ -/build-xcode/ -/build-make/ +/build*/ *~ *.dir *.idea/ diff --git a/CMakeLists.txt b/CMakeLists.txt index ab0456280b..e5f461efbe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -158,7 +158,6 @@ if (UNIX) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GNU_SOURCE" CACHE STRING "" FORCE) endif() endif () - set(ASSIMP_BUILD_MINIZIP ON CACHE BOOL "Set to have assimp build minizip" FORCE) endif () add_subdirectory(ext) @@ -197,6 +196,7 @@ if (APPLE) "~/Qt/5.11/clang_64/lib/cmake" "~/Qt/5.12/clang_64/lib/cmake" "~/Qt/5.15.1/clang_64/lib/cmake" + "~/Qt/6.2.3/macos/lib/cmake" ) endif () diff --git a/apps/OpenSpace/ext/launcher/src/sgctedit/displaywindowunion.cpp b/apps/OpenSpace/ext/launcher/src/sgctedit/displaywindowunion.cpp index 9f2486a447..e08b11b5ad 100644 --- a/apps/OpenSpace/ext/launcher/src/sgctedit/displaywindowunion.cpp +++ b/apps/OpenSpace/ext/launcher/src/sgctedit/displaywindowunion.cpp @@ -48,8 +48,8 @@ void DisplayWindowUnion::createWidgets(int nMaxWindows, std::array windowColors) { // Add all window controls (some will be hidden from GUI initially) - for (unsigned int i = 0; i < nMaxWindows; ++i) { - const unsigned int monitorNumForThisWindow = (nMaxWindows > 3 && i >= 2) ? 1 : 0; + for (int i = 0; i < nMaxWindows; ++i) { + const int monitorNumForThisWindow = (nMaxWindows > 3 && i >= 2) ? 1 : 0; WindowControl* ctrl = new WindowControl( monitorNumForThisWindow, diff --git a/apps/OpenSpace/ext/launcher/src/sgctedit/sgctedit.cpp b/apps/OpenSpace/ext/launcher/src/sgctedit/sgctedit.cpp index ba38bd9963..da5de7b8aa 100644 --- a/apps/OpenSpace/ext/launcher/src/sgctedit/sgctedit.cpp +++ b/apps/OpenSpace/ext/launcher/src/sgctedit/sgctedit.cpp @@ -183,7 +183,7 @@ void SgctEdit::save() { "window 2 has to be bigger than window 3 (if it exists), and window 3 has to " "be bigger than window 4.\nOtherwise, rendering errors might occur.\n\nAre " "you sure you want to continue?", - QMessageBox::StandardButtons(QMessageBox::Yes || QMessageBox::No) + QMessageBox::StandardButtons(QMessageBox::Yes | QMessageBox::No) ); if (ret == QMessageBox::No) { return; diff --git a/apps/OpenSpace/ext/sgct b/apps/OpenSpace/ext/sgct index 47167ca513..ad940a5c95 160000 --- a/apps/OpenSpace/ext/sgct +++ b/apps/OpenSpace/ext/sgct @@ -1 +1 @@ -Subproject commit 47167ca513062e907dd0d86a4e5681d8368a77a1 +Subproject commit ad940a5c955c1e5ef94bcb042cae15060a04e0e4 diff --git a/ext/ghoul b/ext/ghoul index fd981861ba..7dc41a163e 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit fd981861ba3111260b4e7513e69f6c8b34617122 +Subproject commit 7dc41a163e2d4d90cc411a0e04cd8e8293f958b4 diff --git a/include/openspace/interaction/sessionrecording.h b/include/openspace/interaction/sessionrecording.h index cc6a33ce71..81640b17c1 100644 --- a/include/openspace/interaction/sessionrecording.h +++ b/include/openspace/interaction/sessionrecording.h @@ -101,7 +101,7 @@ public: SessionRecording(); SessionRecording(bool isGlobal); - ~SessionRecording(); + ~SessionRecording() override; /** * Used to de-initialize the session recording feature. Any recording or playback @@ -837,7 +837,7 @@ protected: class SessionRecording_legacy_0085 : public SessionRecording { public: SessionRecording_legacy_0085() : SessionRecording() {} - ~SessionRecording_legacy_0085() {} + ~SessionRecording_legacy_0085() override {} char FileHeaderVersion[FileHeaderVersionLength+1] = "00.85"; char TargetConvertVersion[FileHeaderVersionLength+1] = "01.00"; std::string fileFormatVersion() override { diff --git a/include/openspace/interaction/tasks/convertrecfileversiontask.h b/include/openspace/interaction/tasks/convertrecfileversiontask.h index e2c37b093c..c5e108bedb 100644 --- a/include/openspace/interaction/tasks/convertrecfileversiontask.h +++ b/include/openspace/interaction/tasks/convertrecfileversiontask.h @@ -37,7 +37,7 @@ namespace openspace::interaction { class ConvertRecFileVersionTask : public Task { public: ConvertRecFileVersionTask(const ghoul::Dictionary& dictionary); - ~ConvertRecFileVersionTask(); + ~ConvertRecFileVersionTask() override; std::string description() override; void perform(const Task::ProgressCallback& progressCallback) override; static documentation::Documentation documentation(); diff --git a/include/openspace/interaction/tasks/convertrecformattask.h b/include/openspace/interaction/tasks/convertrecformattask.h index 7f314fc5a9..dbcf695bc2 100644 --- a/include/openspace/interaction/tasks/convertrecformattask.h +++ b/include/openspace/interaction/tasks/convertrecformattask.h @@ -41,7 +41,7 @@ public: ToBinary }; ConvertRecFormatTask(const ghoul::Dictionary& dictionary); - ~ConvertRecFormatTask(); + ~ConvertRecFormatTask() override; std::string description() override; void perform(const Task::ProgressCallback& progressCallback) override; static documentation::Documentation documentation(); diff --git a/include/openspace/navigation/navigationhandler.h b/include/openspace/navigation/navigationhandler.h index 5a2bfd6be3..cb697d9ff8 100644 --- a/include/openspace/navigation/navigationhandler.h +++ b/include/openspace/navigation/navigationhandler.h @@ -61,7 +61,7 @@ class PathNavigator; class NavigationHandler : public properties::PropertyOwner { public: NavigationHandler(); - ~NavigationHandler(); + virtual ~NavigationHandler() override; void initialize(); void deinitialize(); diff --git a/include/openspace/navigation/pathnavigator.h b/include/openspace/navigation/pathnavigator.h index 9b30744546..681e7acc03 100644 --- a/include/openspace/navigation/pathnavigator.h +++ b/include/openspace/navigation/pathnavigator.h @@ -51,7 +51,7 @@ class Path; class PathNavigator : public properties::PropertyOwner { public: PathNavigator(); - ~PathNavigator(); + virtual ~PathNavigator() override; // Accessors Camera* camera() const; diff --git a/include/openspace/network/parallelpeer.h b/include/openspace/network/parallelpeer.h index fd73c87a6c..fb0b70b104 100644 --- a/include/openspace/network/parallelpeer.h +++ b/include/openspace/network/parallelpeer.h @@ -47,7 +47,7 @@ namespace scripting { struct LuaLibrary; } class ParallelPeer : public properties::PropertyOwner { public: ParallelPeer(); - ~ParallelPeer(); + ~ParallelPeer() override; void connect(); void setPort(std::string port); diff --git a/include/openspace/properties/listproperty.h b/include/openspace/properties/listproperty.h index 1f1dc20fba..f7628fe864 100644 --- a/include/openspace/properties/listproperty.h +++ b/include/openspace/properties/listproperty.h @@ -35,7 +35,7 @@ class ListProperty : public TemplateProperty> { public: ListProperty(Property::PropertyInfo info, std::vector values); - virtual ~ListProperty() = 0; + virtual ~ListProperty() override = 0; }; } // namespace openspace::properties diff --git a/include/openspace/properties/propertyowner.h b/include/openspace/properties/propertyowner.h index 14f2c98095..ebcfbf8ed5 100644 --- a/include/openspace/properties/propertyowner.h +++ b/include/openspace/properties/propertyowner.h @@ -77,7 +77,7 @@ public: * The destructor will remove all Propertys and PropertyOwners it owns along with * itself. */ - virtual ~PropertyOwner(); + virtual ~PropertyOwner() override; /** * Sets the identifier for this PropertyOwner. If the PropertyOwner does not have an diff --git a/include/openspace/rendering/dashboard.h b/include/openspace/rendering/dashboard.h index 6fcb0134a5..a4662fd5e4 100644 --- a/include/openspace/rendering/dashboard.h +++ b/include/openspace/rendering/dashboard.h @@ -41,7 +41,7 @@ namespace scripting { struct LuaLibrary; } class Dashboard : public properties::PropertyOwner { public: Dashboard(); - ~Dashboard() = default; + virtual ~Dashboard() override = default; void render(glm::vec2& penPosition); diff --git a/include/openspace/rendering/framebufferrenderer.h b/include/openspace/rendering/framebufferrenderer.h index 970691a0d2..5e80373e98 100644 --- a/include/openspace/rendering/framebufferrenderer.h +++ b/include/openspace/rendering/framebufferrenderer.h @@ -58,7 +58,7 @@ class FramebufferRenderer : public RaycasterListener, public DeferredcasterListener { public: - virtual ~FramebufferRenderer() = default; + virtual ~FramebufferRenderer() override final = default; void initialize(); void deinitialize(); diff --git a/include/openspace/rendering/luaconsole.h b/include/openspace/rendering/luaconsole.h index f60634d458..1f2de27602 100644 --- a/include/openspace/rendering/luaconsole.h +++ b/include/openspace/rendering/luaconsole.h @@ -46,7 +46,7 @@ namespace openspace { class LuaConsole : public properties::PropertyOwner { public: LuaConsole(); - ~LuaConsole(); + ~LuaConsole() override; void initialize(); void deinitialize(); diff --git a/include/openspace/rendering/renderable.h b/include/openspace/rendering/renderable.h index 434ce28385..b698650698 100644 --- a/include/openspace/rendering/renderable.h +++ b/include/openspace/rendering/renderable.h @@ -65,7 +65,7 @@ public: ghoul::Dictionary dictionary); Renderable(const ghoul::Dictionary& dictionary); - virtual ~Renderable() = default; + virtual ~Renderable() override = default; virtual void initialize(); virtual void initializeGL(); diff --git a/include/openspace/rendering/renderengine.h b/include/openspace/rendering/renderengine.h index 336acd6383..da22120fa3 100644 --- a/include/openspace/rendering/renderengine.h +++ b/include/openspace/rendering/renderengine.h @@ -66,7 +66,7 @@ struct ShutdownInformation; class RenderEngine : public properties::PropertyOwner { public: RenderEngine(); - ~RenderEngine(); + virtual ~RenderEngine() override; void initialize(); void initializeGL(); diff --git a/include/openspace/rendering/screenspacerenderable.h b/include/openspace/rendering/screenspacerenderable.h index 9c153d3576..f36382191c 100644 --- a/include/openspace/rendering/screenspacerenderable.h +++ b/include/openspace/rendering/screenspacerenderable.h @@ -58,7 +58,7 @@ public: static constexpr const char* KeyIdentifier = "Identifier"; ScreenSpaceRenderable(const ghoul::Dictionary& dictionary); - virtual ~ScreenSpaceRenderable(); + virtual ~ScreenSpaceRenderable() override; virtual void render(); diff --git a/include/openspace/scene/lightsource.h b/include/openspace/scene/lightsource.h index 8dcd3a2320..fbc3c103fd 100644 --- a/include/openspace/scene/lightsource.h +++ b/include/openspace/scene/lightsource.h @@ -47,7 +47,7 @@ public: LightSource(); LightSource(const ghoul::Dictionary& dictionary); - virtual ~LightSource() = default; + ~LightSource() override = default; virtual glm::vec3 directionViewSpace(const RenderData& renderData) const = 0; diff --git a/include/openspace/scene/rotation.h b/include/openspace/scene/rotation.h index 33fc29dd24..d6ecd5d73f 100644 --- a/include/openspace/scene/rotation.h +++ b/include/openspace/scene/rotation.h @@ -45,7 +45,7 @@ public: const ghoul::Dictionary& dictionary); Rotation(); - virtual ~Rotation() = default; + virtual ~Rotation() override = default; virtual bool initialize(); diff --git a/include/openspace/scene/scale.h b/include/openspace/scene/scale.h index f77a8d582a..79f39092a6 100644 --- a/include/openspace/scene/scale.h +++ b/include/openspace/scene/scale.h @@ -45,7 +45,7 @@ public: const ghoul::Dictionary& dictionary); Scale(); - virtual ~Scale() = default; + virtual ~Scale() override = default; virtual bool initialize(); diff --git a/include/openspace/scene/scene.h b/include/openspace/scene/scene.h index 0bb485576c..6ec1097326 100644 --- a/include/openspace/scene/scene.h +++ b/include/openspace/scene/scene.h @@ -82,7 +82,7 @@ public: // constructors & destructor Scene(std::unique_ptr initializer); - ~Scene(); + virtual ~Scene() override; /** * Clear the scene graph, diff --git a/include/openspace/scene/scenegraphnode.h b/include/openspace/scene/scenegraphnode.h index b9ba6c63e6..9435e51515 100644 --- a/include/openspace/scene/scenegraphnode.h +++ b/include/openspace/scene/scenegraphnode.h @@ -81,7 +81,7 @@ public: static constexpr const char* KeyTag = "Tag"; SceneGraphNode(); - ~SceneGraphNode(); + virtual ~SceneGraphNode() override; static ghoul::mm_unique_ptr createFromDictionary( const ghoul::Dictionary& dictionary); diff --git a/include/openspace/scene/timeframe.h b/include/openspace/scene/timeframe.h index b1cf5e838c..c89f4f9bc2 100644 --- a/include/openspace/scene/timeframe.h +++ b/include/openspace/scene/timeframe.h @@ -45,7 +45,7 @@ public: const ghoul::Dictionary& dictionary); TimeFrame(); - virtual ~TimeFrame() = default; + virtual ~TimeFrame() override = default; virtual bool initialize(); diff --git a/include/openspace/scene/translation.h b/include/openspace/scene/translation.h index 1945d15d5b..4f5d0c28ce 100644 --- a/include/openspace/scene/translation.h +++ b/include/openspace/scene/translation.h @@ -47,7 +47,7 @@ public: const ghoul::Dictionary& dictionary); Translation(); - virtual ~Translation() = default; + virtual ~Translation() override = default; virtual bool initialize(); virtual void update(const UpdateData& data); diff --git a/include/openspace/util/httprequest.h b/include/openspace/util/httprequest.h index 78fcf7065e..3b35277a46 100644 --- a/include/openspace/util/httprequest.h +++ b/include/openspace/util/httprequest.h @@ -375,7 +375,7 @@ public: * This destructor will cancel any ongoing download and wait for its completion, so it * might not block for a short amount of time. */ - virtual ~HttpFileDownload() = default; + virtual ~HttpFileDownload() override = default; /** * Returns the path where the contents of the URL provided in the constructor will be @@ -443,7 +443,7 @@ public: * This destructor will cancel any ongoing download and wait for its completion, so it * might not block for a short amount of time. */ - virtual ~HttpMemoryDownload() = default; + virtual ~HttpMemoryDownload() override = default; /** * Returns a reference to the buffer that is used to store the contents of the URL diff --git a/include/openspace/util/openspacemodule.h b/include/openspace/util/openspacemodule.h index da4bb80763..2c4f07dfbe 100644 --- a/include/openspace/util/openspacemodule.h +++ b/include/openspace/util/openspacemodule.h @@ -58,7 +58,7 @@ public: OpenSpaceModule(std::string name); /// Default destructor - virtual ~OpenSpaceModule() = default; + virtual ~OpenSpaceModule() override = default; /** * Initialization method that will register a token of the form diff --git a/include/openspace/util/screenlog.h b/include/openspace/util/screenlog.h index 0570f9b14b..aeb9fede35 100644 --- a/include/openspace/util/screenlog.h +++ b/include/openspace/util/screenlog.h @@ -82,7 +82,7 @@ public: /** * Destructor */ - ~ScreenLog() = default; + ~ScreenLog() override = default; /** * Overwritten ghoul::loggling::Log method that is called whenever a new log message diff --git a/modules/atmosphere/rendering/atmospheredeferredcaster.h b/modules/atmosphere/rendering/atmospheredeferredcaster.h index c6d85ce6b8..0cd9c8faab 100644 --- a/modules/atmosphere/rendering/atmospheredeferredcaster.h +++ b/modules/atmosphere/rendering/atmospheredeferredcaster.h @@ -59,7 +59,7 @@ class AtmosphereDeferredcaster : public Deferredcaster { public: AtmosphereDeferredcaster(float textureScale, std::vector shadowConfigArray, bool saveCalculatedTextures); - virtual ~AtmosphereDeferredcaster() = default; + ~AtmosphereDeferredcaster() override = default; void initialize(); void deinitialize(); diff --git a/modules/base/basemodule.h b/modules/base/basemodule.h index 8f26b850ec..aecd76f637 100644 --- a/modules/base/basemodule.h +++ b/modules/base/basemodule.h @@ -37,7 +37,7 @@ public: constexpr static const char* Name = "Base"; BaseModule(); - virtual ~BaseModule() = default; + ~BaseModule() override = default; std::vector documentations() const override; std::vector luaLibraries() const override; diff --git a/modules/base/dashboard/dashboarditemangle.h b/modules/base/dashboard/dashboarditemangle.h index f24e9ac24e..8e5b1b566d 100644 --- a/modules/base/dashboard/dashboarditemangle.h +++ b/modules/base/dashboard/dashboarditemangle.h @@ -40,7 +40,7 @@ namespace documentation { struct Documentation; } class DashboardItemAngle : public DashboardTextItem { public: DashboardItemAngle(const ghoul::Dictionary& dictionary); - virtual ~DashboardItemAngle() = default; + ~DashboardItemAngle() override = default; void render(glm::vec2& penPosition) override; diff --git a/modules/base/dashboard/dashboarditemdate.h b/modules/base/dashboard/dashboarditemdate.h index 379db541c6..f1082d670a 100644 --- a/modules/base/dashboard/dashboarditemdate.h +++ b/modules/base/dashboard/dashboarditemdate.h @@ -36,7 +36,7 @@ namespace documentation { struct Documentation; } class DashboardItemDate : public DashboardTextItem { public: DashboardItemDate(const ghoul::Dictionary& dictionary); - ~DashboardItemDate() = default; + ~DashboardItemDate() override = default; void render(glm::vec2& penPosition) override; diff --git a/modules/base/dashboard/dashboarditemdistance.h b/modules/base/dashboard/dashboarditemdistance.h index f953269027..8516b7e95d 100644 --- a/modules/base/dashboard/dashboarditemdistance.h +++ b/modules/base/dashboard/dashboarditemdistance.h @@ -41,7 +41,7 @@ namespace documentation { struct Documentation; } class DashboardItemDistance : public DashboardTextItem { public: DashboardItemDistance(const ghoul::Dictionary& dictionary); - virtual ~DashboardItemDistance() = default; + ~DashboardItemDistance() override = default; void render(glm::vec2& penPosition) override; diff --git a/modules/base/dashboard/dashboarditemmission.h b/modules/base/dashboard/dashboarditemmission.h index d197f79a21..333819d037 100644 --- a/modules/base/dashboard/dashboarditemmission.h +++ b/modules/base/dashboard/dashboarditemmission.h @@ -34,7 +34,7 @@ namespace documentation { struct Documentation; } class DashboardItemMission : public DashboardTextItem { public: DashboardItemMission(const ghoul::Dictionary& dictionary); - virtual ~DashboardItemMission() = default; + ~DashboardItemMission() override = default; void render(glm::vec2& penPosition) override; diff --git a/modules/base/dashboard/dashboarditemparallelconnection.h b/modules/base/dashboard/dashboarditemparallelconnection.h index 4b4f5c12a7..aeb3f1f833 100644 --- a/modules/base/dashboard/dashboarditemparallelconnection.h +++ b/modules/base/dashboard/dashboarditemparallelconnection.h @@ -34,7 +34,7 @@ namespace documentation { struct Documentation; } class DashboardItemParallelConnection : public DashboardTextItem { public: DashboardItemParallelConnection(const ghoul::Dictionary& dictionary); - virtual ~DashboardItemParallelConnection() = default; + ~DashboardItemParallelConnection() override = default; void render(glm::vec2& penPosition) override; diff --git a/modules/base/dashboard/dashboarditempropertyvalue.h b/modules/base/dashboard/dashboarditempropertyvalue.h index 6652a91829..83296d940b 100644 --- a/modules/base/dashboard/dashboarditempropertyvalue.h +++ b/modules/base/dashboard/dashboarditempropertyvalue.h @@ -38,7 +38,7 @@ namespace documentation { struct Documentation; } class DashboardItemPropertyValue : public DashboardTextItem { public: DashboardItemPropertyValue(const ghoul::Dictionary& dictionary); - ~DashboardItemPropertyValue() = default; + ~DashboardItemPropertyValue() override = default; void render(glm::vec2& penPosition) override; diff --git a/modules/base/dashboard/dashboarditemsimulationincrement.h b/modules/base/dashboard/dashboarditemsimulationincrement.h index 9ed3ca1e56..8348654422 100644 --- a/modules/base/dashboard/dashboarditemsimulationincrement.h +++ b/modules/base/dashboard/dashboarditemsimulationincrement.h @@ -38,7 +38,7 @@ namespace documentation { struct Documentation; } class DashboardItemSimulationIncrement : public DashboardTextItem { public: DashboardItemSimulationIncrement(const ghoul::Dictionary& dictionary); - virtual ~DashboardItemSimulationIncrement() = default; + ~DashboardItemSimulationIncrement() override = default; void render(glm::vec2& penPosition) override; glm::vec2 size() const override; diff --git a/modules/base/dashboard/dashboarditemspacing.h b/modules/base/dashboard/dashboarditemspacing.h index 84e3605cda..4a8aa24c3f 100644 --- a/modules/base/dashboard/dashboarditemspacing.h +++ b/modules/base/dashboard/dashboarditemspacing.h @@ -36,7 +36,7 @@ namespace documentation { struct Documentation; } class DashboardItemSpacing : public DashboardItem { public: DashboardItemSpacing(const ghoul::Dictionary& dictionary); - virtual ~DashboardItemSpacing() = default; + ~DashboardItemSpacing() override = default; void render(glm::vec2& penPosition) override; diff --git a/modules/base/dashboard/dashboarditemtext.h b/modules/base/dashboard/dashboarditemtext.h index 4c4b3ec12e..b12fd732da 100644 --- a/modules/base/dashboard/dashboarditemtext.h +++ b/modules/base/dashboard/dashboarditemtext.h @@ -36,7 +36,7 @@ namespace documentation { struct Documentation; } class DashboardItemText : public DashboardTextItem { public: DashboardItemText(const ghoul::Dictionary& dictionary); - virtual ~DashboardItemText() = default; + ~DashboardItemText() override = default; void render(glm::vec2& penPosition) override; diff --git a/modules/base/dashboard/dashboarditemvelocity.h b/modules/base/dashboard/dashboarditemvelocity.h index a701918281..f1dcb7a053 100644 --- a/modules/base/dashboard/dashboarditemvelocity.h +++ b/modules/base/dashboard/dashboarditemvelocity.h @@ -40,7 +40,7 @@ namespace documentation { struct Documentation; } class DashboardItemVelocity : public DashboardTextItem { public: DashboardItemVelocity(const ghoul::Dictionary& dictionary); - virtual ~DashboardItemVelocity() = default; + ~DashboardItemVelocity() override = default; void render(glm::vec2& penPosition) override; diff --git a/modules/base/rendering/grids/renderableradialgrid.h b/modules/base/rendering/grids/renderableradialgrid.h index 39a374ee18..93187dfb9f 100644 --- a/modules/base/rendering/grids/renderableradialgrid.h +++ b/modules/base/rendering/grids/renderableradialgrid.h @@ -44,7 +44,7 @@ namespace openspace { class RenderableRadialGrid : public Renderable { public: RenderableRadialGrid(const ghoul::Dictionary& dictionary); - ~RenderableRadialGrid() = default; + ~RenderableRadialGrid() override = default; void initializeGL() override; void deinitializeGL() override; diff --git a/modules/base/rendering/grids/renderablesphericalgrid.h b/modules/base/rendering/grids/renderablesphericalgrid.h index 733a3f8cca..8fbf77ea03 100644 --- a/modules/base/rendering/grids/renderablesphericalgrid.h +++ b/modules/base/rendering/grids/renderablesphericalgrid.h @@ -41,7 +41,7 @@ namespace openspace { class RenderableSphericalGrid : public Renderable { public: RenderableSphericalGrid(const ghoul::Dictionary& dictionary); - ~RenderableSphericalGrid() = default; + ~RenderableSphericalGrid() override = default; void initializeGL() override; void deinitializeGL() override; diff --git a/modules/base/rendering/renderablecartesianaxes.h b/modules/base/rendering/renderablecartesianaxes.h index 3e6a5d9c60..e097a8dbc4 100644 --- a/modules/base/rendering/renderablecartesianaxes.h +++ b/modules/base/rendering/renderablecartesianaxes.h @@ -43,7 +43,7 @@ namespace openspace { class RenderableCartesianAxes : public Renderable { public: RenderableCartesianAxes(const ghoul::Dictionary& dictionary); - ~RenderableCartesianAxes() = default; + ~RenderableCartesianAxes() override = default; void initializeGL() override; void deinitializeGL() override; diff --git a/modules/base/rendering/renderablemodel.h b/modules/base/rendering/renderablemodel.h index a966fcfa4b..4662690245 100644 --- a/modules/base/rendering/renderablemodel.h +++ b/modules/base/rendering/renderablemodel.h @@ -57,7 +57,7 @@ namespace documentation { struct Documentation; } class RenderableModel : public Renderable { public: RenderableModel(const ghoul::Dictionary& dictionary); - ~RenderableModel() = default; + ~RenderableModel() override = default; void initialize() override; void initializeGL() override; diff --git a/modules/base/rendering/renderablenodeline.h b/modules/base/rendering/renderablenodeline.h index 23761c5c4a..30a49b3ccd 100644 --- a/modules/base/rendering/renderablenodeline.h +++ b/modules/base/rendering/renderablenodeline.h @@ -46,7 +46,7 @@ class Translation; class RenderableNodeLine : public Renderable { public: RenderableNodeLine(const ghoul::Dictionary& dictionary); - ~RenderableNodeLine() = default; + ~RenderableNodeLine() override = default; static documentation::Documentation Documentation(); diff --git a/modules/base/rendering/renderabletrail.h b/modules/base/rendering/renderabletrail.h index ec8c08dfd4..7379a3920e 100644 --- a/modules/base/rendering/renderabletrail.h +++ b/modules/base/rendering/renderabletrail.h @@ -91,7 +91,7 @@ struct Appearance : properties::PropertyOwner { properties::OptionProperty renderingModes; }; - ~RenderableTrail() = default; + virtual ~RenderableTrail() override = default; void initializeGL() override; void deinitializeGL() override; diff --git a/modules/base/rendering/screenspacedashboard.h b/modules/base/rendering/screenspacedashboard.h index 9655675294..28b486f8bf 100644 --- a/modules/base/rendering/screenspacedashboard.h +++ b/modules/base/rendering/screenspacedashboard.h @@ -43,7 +43,7 @@ namespace scripting { struct LuaLibrary; } class ScreenSpaceDashboard: public ScreenSpaceFramebuffer { public: ScreenSpaceDashboard(const ghoul::Dictionary& dictionary); - ~ScreenSpaceDashboard() = default; + virtual ~ScreenSpaceDashboard() override = default; bool initializeGL() override; bool deinitializeGL() override; diff --git a/modules/base/rendering/screenspaceframebuffer.h b/modules/base/rendering/screenspaceframebuffer.h index f353673e68..5f2c863ae4 100644 --- a/modules/base/rendering/screenspaceframebuffer.h +++ b/modules/base/rendering/screenspaceframebuffer.h @@ -51,7 +51,7 @@ public: using RenderFunction = std::function; ScreenSpaceFramebuffer(const ghoul::Dictionary& dictionary = ghoul::Dictionary()); - ~ScreenSpaceFramebuffer(); + virtual ~ScreenSpaceFramebuffer() override; bool initializeGL() override; bool deinitializeGL() override; diff --git a/modules/base/rendering/screenspaceimageonline.h b/modules/base/rendering/screenspaceimageonline.h index 5cbd7db994..2d75a41d29 100644 --- a/modules/base/rendering/screenspaceimageonline.h +++ b/modules/base/rendering/screenspaceimageonline.h @@ -39,7 +39,7 @@ namespace documentation { struct Documentation; } class ScreenSpaceImageOnline : public ScreenSpaceRenderable { public: ScreenSpaceImageOnline(const ghoul::Dictionary& dictionary); - ~ScreenSpaceImageOnline(); + virtual ~ScreenSpaceImageOnline() override; bool deinitializeGL() override; diff --git a/modules/cefwebgui/cefwebguimodule.cpp b/modules/cefwebgui/cefwebguimodule.cpp index b812c2b9f6..c9c8537350 100644 --- a/modules/cefwebgui/cefwebguimodule.cpp +++ b/modules/cefwebgui/cefwebguimodule.cpp @@ -239,8 +239,8 @@ void CefWebGuiModule::internalInitialize(const ghoul::Dictionary& configuration) ZoneScopedN("CefWebGuiModule") if (_endpointCallback != -1) { - WebGuiModule* webGuiModule = global::moduleEngine->module(); - webGuiModule->removeEndpointChangeCallback(_endpointCallback); + WebGuiModule* m = global::moduleEngine->module(); + m->removeEndpointChangeCallback(_endpointCallback); _endpointCallback = -1; } _enabled = false; diff --git a/modules/cefwebgui/include/guikeyboardhandler.h b/modules/cefwebgui/include/guikeyboardhandler.h index 28c8eb5b8a..aeae5c8306 100644 --- a/modules/cefwebgui/include/guikeyboardhandler.h +++ b/modules/cefwebgui/include/guikeyboardhandler.h @@ -32,7 +32,7 @@ namespace openspace { class GUIKeyboardHandler : public WebKeyboardHandler { public: GUIKeyboardHandler(); - virtual ~GUIKeyboardHandler() = default; + ~GUIKeyboardHandler() override = default; }; } // namespace openspace diff --git a/modules/cefwebgui/include/guirenderhandler.h b/modules/cefwebgui/include/guirenderhandler.h index 4736c62fe4..bd6ce4505b 100644 --- a/modules/cefwebgui/include/guirenderhandler.h +++ b/modules/cefwebgui/include/guirenderhandler.h @@ -37,7 +37,7 @@ namespace openspace { class GUIRenderHandler : public WebRenderHandler { public: GUIRenderHandler(); - virtual ~GUIRenderHandler(); + ~GUIRenderHandler() override; void draw() override; void render() override; diff --git a/modules/debugging/rendering/renderabledebugplane.h b/modules/debugging/rendering/renderabledebugplane.h index c6ab42cc46..dc39b40b16 100644 --- a/modules/debugging/rendering/renderabledebugplane.h +++ b/modules/debugging/rendering/renderabledebugplane.h @@ -48,7 +48,7 @@ struct UpdateStructure; class RenderableDebugPlane : public Renderable { public: RenderableDebugPlane(const ghoul::Dictionary& dictionary); - ~RenderableDebugPlane() = default; + ~RenderableDebugPlane() override = default; void initializeGL() override; void deinitializeGL() override; diff --git a/modules/digitaluniverse/digitaluniversemodule.h b/modules/digitaluniverse/digitaluniversemodule.h index a6561533e1..904a9b83f9 100644 --- a/modules/digitaluniverse/digitaluniversemodule.h +++ b/modules/digitaluniverse/digitaluniversemodule.h @@ -37,7 +37,7 @@ public: constexpr static const char* Name = "DigitalUniverse"; DigitalUniverseModule(); - virtual ~DigitalUniverseModule() = default; + ~DigitalUniverseModule() override = default; std::vector documentations() const override; static ghoul::opengl::ProgramObjectManager ProgramObjectManager; diff --git a/modules/digitaluniverse/rendering/renderablebillboardscloud.h b/modules/digitaluniverse/rendering/renderablebillboardscloud.h index 0dd208e036..d944b2adb9 100644 --- a/modules/digitaluniverse/rendering/renderablebillboardscloud.h +++ b/modules/digitaluniverse/rendering/renderablebillboardscloud.h @@ -56,7 +56,7 @@ namespace documentation { struct Documentation; } class RenderableBillboardsCloud : public Renderable { public: explicit RenderableBillboardsCloud(const ghoul::Dictionary& dictionary); - ~RenderableBillboardsCloud() = default; + ~RenderableBillboardsCloud() override = default; void initialize() override; void initializeGL() override; diff --git a/modules/digitaluniverse/rendering/renderabledumeshes.h b/modules/digitaluniverse/rendering/renderabledumeshes.h index c52154161d..bdfc67c42c 100644 --- a/modules/digitaluniverse/rendering/renderabledumeshes.h +++ b/modules/digitaluniverse/rendering/renderabledumeshes.h @@ -53,7 +53,7 @@ namespace documentation { struct Documentation; } class RenderableDUMeshes : public Renderable { public: explicit RenderableDUMeshes(const ghoul::Dictionary& dictionary); - ~RenderableDUMeshes() = default; + ~RenderableDUMeshes() override = default; void initializeGL() override; void deinitializeGL() override; diff --git a/modules/digitaluniverse/rendering/renderableplanescloud.h b/modules/digitaluniverse/rendering/renderableplanescloud.h index 9de0c3e51e..d155556251 100644 --- a/modules/digitaluniverse/rendering/renderableplanescloud.h +++ b/modules/digitaluniverse/rendering/renderableplanescloud.h @@ -57,7 +57,7 @@ namespace documentation { struct Documentation; } class RenderablePlanesCloud : public Renderable { public: explicit RenderablePlanesCloud(const ghoul::Dictionary& dictionary); - ~RenderablePlanesCloud() = default; + ~RenderablePlanesCloud() override = default; void initialize() override; void initializeGL() override; diff --git a/modules/digitaluniverse/rendering/renderablepoints.h b/modules/digitaluniverse/rendering/renderablepoints.h index c3f19432d2..8c374f0d1f 100644 --- a/modules/digitaluniverse/rendering/renderablepoints.h +++ b/modules/digitaluniverse/rendering/renderablepoints.h @@ -52,7 +52,7 @@ namespace documentation { struct Documentation; } class RenderablePoints : public Renderable { public: explicit RenderablePoints(const ghoul::Dictionary& dictionary); - ~RenderablePoints() = default; + ~RenderablePoints() override = default; void initialize() override; void initializeGL() override; diff --git a/modules/exoplanets/exoplanetsmodule.h b/modules/exoplanets/exoplanetsmodule.h index 085eab1aff..7ab0941477 100644 --- a/modules/exoplanets/exoplanetsmodule.h +++ b/modules/exoplanets/exoplanetsmodule.h @@ -39,7 +39,7 @@ public: constexpr static const char* Name = "Exoplanets"; ExoplanetsModule(); - virtual ~ExoplanetsModule() = default; + ~ExoplanetsModule() override = default; bool hasDataFiles() const; std::string exoplanetsDataPath() const; @@ -61,6 +61,7 @@ public: protected: void internalInitialize(const ghoul::Dictionary& dict) override; + properties::BoolProperty _enabled; properties::StringProperty _exoplanetsDataFolder; properties::StringProperty _bvColorMapPath; properties::StringProperty _starTexturePath; @@ -74,8 +75,6 @@ protected: properties::BoolProperty _useOptimisticZone; properties::FloatProperty _habitableZoneOpacity; - - properties::BoolProperty _enabled; }; } // namespace openspace diff --git a/modules/gaia/gaiamodule.h b/modules/gaia/gaiamodule.h index 1fc9fa546a..f2ebb6017b 100644 --- a/modules/gaia/gaiamodule.h +++ b/modules/gaia/gaiamodule.h @@ -36,7 +36,7 @@ public: constexpr static const char* Name = "Gaia"; GaiaModule(); - virtual ~GaiaModule() = default; + ~GaiaModule() override = default; std::vector documentations() const override; scripting::LuaLibrary luaLibrary() const override; diff --git a/modules/gaia/rendering/renderablegaiastars.h b/modules/gaia/rendering/renderablegaiastars.h index ca4c364a62..125650516d 100644 --- a/modules/gaia/rendering/renderablegaiastars.h +++ b/modules/gaia/rendering/renderablegaiastars.h @@ -53,7 +53,7 @@ namespace documentation { struct Documentation; } class RenderableGaiaStars : public Renderable { public: explicit RenderableGaiaStars(const ghoul::Dictionary& dictionary); - virtual ~RenderableGaiaStars() = default; + ~RenderableGaiaStars() override = default; void initializeGL() override; void deinitializeGL() override; diff --git a/modules/gaia/tasks/constructoctreetask.h b/modules/gaia/tasks/constructoctreetask.h index d1ffbe00ee..6b076b201d 100644 --- a/modules/gaia/tasks/constructoctreetask.h +++ b/modules/gaia/tasks/constructoctreetask.h @@ -38,7 +38,7 @@ namespace documentation { struct Documentation; } class ConstructOctreeTask : public Task { public: ConstructOctreeTask(const ghoul::Dictionary& dictionary); - virtual ~ConstructOctreeTask() = default; + ~ConstructOctreeTask() override = default; std::string description() override; void perform(const Task::ProgressCallback& onProgress) override; diff --git a/modules/gaia/tasks/readfilejob.h b/modules/gaia/tasks/readfilejob.h index a2e8d91295..3efcb6dd3b 100644 --- a/modules/gaia/tasks/readfilejob.h +++ b/modules/gaia/tasks/readfilejob.h @@ -48,7 +48,7 @@ struct ReadFileJob : public Job>> { int lastRow, size_t nDefaultCols, int nValuesPerStar, std::shared_ptr fitsReader); - ~ReadFileJob() = default; + ~ReadFileJob() override = default; void execute() override; diff --git a/modules/gaia/tasks/readfitstask.h b/modules/gaia/tasks/readfitstask.h index 9ab543bce6..afee65b3b6 100644 --- a/modules/gaia/tasks/readfitstask.h +++ b/modules/gaia/tasks/readfitstask.h @@ -39,7 +39,7 @@ namespace documentation { struct Documentation; } class ReadFitsTask : public Task { public: ReadFitsTask(const ghoul::Dictionary& dictionary); - virtual ~ReadFitsTask() = default; + ~ReadFitsTask() override = default; std::string description() override; void perform(const Task::ProgressCallback& onProgress) override; diff --git a/modules/gaia/tasks/readspecktask.h b/modules/gaia/tasks/readspecktask.h index f498adec97..287dbd18b1 100644 --- a/modules/gaia/tasks/readspecktask.h +++ b/modules/gaia/tasks/readspecktask.h @@ -37,7 +37,7 @@ namespace documentation { struct Documentation; } class ReadSpeckTask : public Task { public: ReadSpeckTask(const ghoul::Dictionary& dictionary); - virtual ~ReadSpeckTask() = default; + ~ReadSpeckTask() override = default; std::string description() override; void perform(const Task::ProgressCallback& onProgress) override; diff --git a/modules/galaxy/rendering/galaxyraycaster.h b/modules/galaxy/rendering/galaxyraycaster.h index 477144dff2..983fb3419d 100644 --- a/modules/galaxy/rendering/galaxyraycaster.h +++ b/modules/galaxy/rendering/galaxyraycaster.h @@ -46,8 +46,8 @@ struct RaycastData; class GalaxyRaycaster : public VolumeRaycaster { public: GalaxyRaycaster(ghoul::opengl::Texture& texture); - - virtual ~GalaxyRaycaster() = default; + ~GalaxyRaycaster() override = default; + void initialize(); void renderEntryPoints(const RenderData& data, diff --git a/modules/galaxy/rendering/renderablegalaxy.h b/modules/galaxy/rendering/renderablegalaxy.h index 6d7755d82a..10a04764e2 100644 --- a/modules/galaxy/rendering/renderablegalaxy.h +++ b/modules/galaxy/rendering/renderablegalaxy.h @@ -45,7 +45,7 @@ struct RenderData; class RenderableGalaxy : public Renderable { public: explicit RenderableGalaxy(const ghoul::Dictionary& dictionary); - virtual ~RenderableGalaxy() = default; + ~RenderableGalaxy() override = default; void initialize() override; void initializeGL() override; diff --git a/modules/galaxy/tasks/milkywayconversiontask.h b/modules/galaxy/tasks/milkywayconversiontask.h index a546b3e212..b5f6162138 100644 --- a/modules/galaxy/tasks/milkywayconversiontask.h +++ b/modules/galaxy/tasks/milkywayconversiontask.h @@ -41,7 +41,7 @@ namespace documentation { struct Documentation; } class MilkywayConversionTask : public Task { public: MilkywayConversionTask(const ghoul::Dictionary& dictionary); - virtual ~MilkywayConversionTask() = default; + ~MilkywayConversionTask() override = default; std::string description() override; void perform(const Task::ProgressCallback& onProgress) override; diff --git a/modules/galaxy/tasks/milkywaypointsconversiontask.h b/modules/galaxy/tasks/milkywaypointsconversiontask.h index 2eaf5ec980..2ba64516a6 100644 --- a/modules/galaxy/tasks/milkywaypointsconversiontask.h +++ b/modules/galaxy/tasks/milkywaypointsconversiontask.h @@ -42,7 +42,7 @@ namespace documentation { struct Documentation; } class MilkywayPointsConversionTask : public Task { public: MilkywayPointsConversionTask(const ghoul::Dictionary& dictionary); - virtual ~MilkywayPointsConversionTask() = default; + ~MilkywayPointsConversionTask() override = default; std::string description() override; void perform(const Task::ProgressCallback& progressCallback) override; diff --git a/modules/globebrowsing/src/dashboarditemglobelocation.h b/modules/globebrowsing/src/dashboarditemglobelocation.h index 96333686a9..466d3c1523 100644 --- a/modules/globebrowsing/src/dashboarditemglobelocation.h +++ b/modules/globebrowsing/src/dashboarditemglobelocation.h @@ -41,7 +41,7 @@ namespace documentation { struct Documentation; } class DashboardItemGlobeLocation : public DashboardItem { public: DashboardItemGlobeLocation(const ghoul::Dictionary& dictionary); - ~DashboardItemGlobeLocation() = default; + ~DashboardItemGlobeLocation() override = default; void render(glm::vec2& penPosition) override; diff --git a/modules/globebrowsing/src/gdalwrapper.h b/modules/globebrowsing/src/gdalwrapper.h index 9f09914fdf..8535e0f48d 100644 --- a/modules/globebrowsing/src/gdalwrapper.h +++ b/modules/globebrowsing/src/gdalwrapper.h @@ -55,7 +55,7 @@ public: private: GdalWrapper(size_t maximumCacheSize, size_t maximumMaximumCacheSize); - ~GdalWrapper() = default; + ~GdalWrapper() override = default; void setGdalProxyConfiguration(); diff --git a/modules/globebrowsing/src/globelabelscomponent.h b/modules/globebrowsing/src/globelabelscomponent.h index 2505f88190..fa400bbed2 100644 --- a/modules/globebrowsing/src/globelabelscomponent.h +++ b/modules/globebrowsing/src/globelabelscomponent.h @@ -50,7 +50,7 @@ namespace globebrowsing { class RenderableGlobe; } class GlobeLabelsComponent : public properties::PropertyOwner { public: GlobeLabelsComponent(); - ~GlobeLabelsComponent() = default; + ~GlobeLabelsComponent() override = default; void initialize(const ghoul::Dictionary& dictionary, globebrowsing::RenderableGlobe* globe); diff --git a/modules/globebrowsing/src/layeradjustment.h b/modules/globebrowsing/src/layeradjustment.h index cbd2616e1d..36b545ab75 100644 --- a/modules/globebrowsing/src/layeradjustment.h +++ b/modules/globebrowsing/src/layeradjustment.h @@ -39,7 +39,7 @@ namespace openspace::globebrowsing { class LayerAdjustment : public properties::PropertyOwner { public: LayerAdjustment(); - ~LayerAdjustment() = default; + ~LayerAdjustment() override = default; void setValuesFromDictionary(const ghoul::Dictionary& adjustmentDict); diff --git a/modules/globebrowsing/src/renderableglobe.h b/modules/globebrowsing/src/renderableglobe.h index 537ea6e69b..2a7666a53f 100644 --- a/modules/globebrowsing/src/renderableglobe.h +++ b/modules/globebrowsing/src/renderableglobe.h @@ -95,7 +95,7 @@ enum class ShadowCompType { class RenderableGlobe : public Renderable { public: RenderableGlobe(const ghoul::Dictionary& dictionary); - ~RenderableGlobe() = default; + ~RenderableGlobe() override = default; void initializeGL() override; void deinitialize() override; diff --git a/modules/globebrowsing/src/tileloadjob.h b/modules/globebrowsing/src/tileloadjob.h index c9cd75cb27..4756f8b4d7 100644 --- a/modules/globebrowsing/src/tileloadjob.h +++ b/modules/globebrowsing/src/tileloadjob.h @@ -47,7 +47,7 @@ struct TileLoadJob : public Job { * Destroys the allocated data pointer if it has been allocated and the TileLoadJob * has ownership of it. */ - ~TileLoadJob(); + ~TileLoadJob() override; /** * If the TileLoadJob has been created using PBO, this is the address that the diff --git a/modules/globebrowsing/src/tileprovider/temporaltileprovider.h b/modules/globebrowsing/src/tileprovider/temporaltileprovider.h index 4e99809273..684e828a31 100644 --- a/modules/globebrowsing/src/tileprovider/temporaltileprovider.h +++ b/modules/globebrowsing/src/tileprovider/temporaltileprovider.h @@ -65,7 +65,7 @@ private: struct InterpolateTileProvider : public TileProvider { InterpolateTileProvider(const ghoul::Dictionary&); - virtual ~InterpolateTileProvider(); + ~InterpolateTileProvider() override; Tile tile(const TileIndex& tileIndex) override final; Tile::Status tileStatus(const TileIndex& index) override final; diff --git a/modules/globebrowsing/src/tileprovider/texttileprovider.h b/modules/globebrowsing/src/tileprovider/texttileprovider.h index 937bf05f71..2e9101e87d 100644 --- a/modules/globebrowsing/src/tileprovider/texttileprovider.h +++ b/modules/globebrowsing/src/tileprovider/texttileprovider.h @@ -32,7 +32,7 @@ namespace openspace::globebrowsing { class TextTileProvider : public TileProvider { public: TextTileProvider(TileTextureInitData initData, size_t fontSize = 48); - virtual ~TextTileProvider(); + ~TextTileProvider() override; void reset() override; diff --git a/modules/globebrowsing/src/tileprovider/tileprovider.h b/modules/globebrowsing/src/tileprovider/tileprovider.h index ca62fb099f..3c06aa60b4 100644 --- a/modules/globebrowsing/src/tileprovider/tileprovider.h +++ b/modules/globebrowsing/src/tileprovider/tileprovider.h @@ -80,7 +80,7 @@ struct TileProvider : public properties::PropertyOwner { static void deinitializeDefaultTile(); TileProvider(); - virtual ~TileProvider() = default; + ~TileProvider() override = default; void initialize(); void deinitialize(); diff --git a/modules/imgui/imguimodule.cpp b/modules/imgui/imguimodule.cpp index a956d0261a..f9132d9488 100644 --- a/modules/imgui/imguimodule.cpp +++ b/modules/imgui/imguimodule.cpp @@ -52,70 +52,6 @@ namespace { constexpr const std::array UniformNames = { "tex", "ortho" }; - void addScreenSpaceRenderableLocal(std::string identifier, std::string texturePath) { - if (!std::filesystem::is_regular_file(absPath(texturePath))) { - LWARNING(fmt::format("Could not find image '{}'", texturePath)); - return; - } - - std::string script; - if (identifier.empty()) { - script = fmt::format( - "openspace.addScreenSpaceRenderable({{\ - Type = 'ScreenSpaceImageLocal',\ - TexturePath = openspace.absPath('{}')\ - }});", - texturePath - ); - } - else { - script = fmt::format( - "openspace.addScreenSpaceRenderable({{\ - Type = 'ScreenSpaceImageLocal',\ - TexturePath = openspace.absPath('{0}'),\ - Identifier = '{1}',\ - Name = '{1}'\ - }});", - texturePath, identifier - ); - } - - openspace::global::scriptEngine->queueScript( - script, - openspace::scripting::ScriptEngine::RemoteScripting::Yes - ); - } - - void addScreenSpaceRenderableOnline(std::string identifier, std::string texturePath) { - std::string script; - if (identifier.empty()) { - script = fmt::format( - "openspace.addScreenSpaceRenderable({{\ - Type = 'ScreenSpaceImageOnline',\ - URL = '{}'\ - }});", - texturePath - ); - } - else { - script = fmt::format( - "openspace.addScreenSpaceRenderable({{\ - Type = 'ScreenSpaceImageOnline',\ - URL = '{0}',\ - Identifier = '{1}',\ - Name = '{1}'\ - }});", - texturePath, - identifier - ); - } - - openspace::global::scriptEngine->queueScript( - script, - openspace::scripting::ScriptEngine::RemoteScripting::Yes - ); - } - constexpr openspace::properties::Property::PropertyInfo EnabledInfo = { "Enabled", "Is Enabled", diff --git a/modules/imgui/src/guiscenecomponent.cpp b/modules/imgui/src/guiscenecomponent.cpp index 05235e98b8..62082ddd16 100644 --- a/modules/imgui/src/guiscenecomponent.cpp +++ b/modules/imgui/src/guiscenecomponent.cpp @@ -68,8 +68,8 @@ namespace { ImGui::Checkbox("Is Ready", &isReady); Renderable::RenderBin bin = renderable->renderBin(); - std::string binStr = [](Renderable::RenderBin bin) { - switch (bin) { + std::string binStr = [](Renderable::RenderBin b) { + switch (b) { case Renderable::RenderBin::Background: return "Background"; case Renderable::RenderBin::Opaque: diff --git a/modules/server/include/serverinterface.h b/modules/server/include/serverinterface.h index 65fff29111..9022569656 100644 --- a/modules/server/include/serverinterface.h +++ b/modules/server/include/serverinterface.h @@ -42,7 +42,7 @@ public: const ghoul::Dictionary& dictionary); ServerInterface(const ghoul::Dictionary& dictionary); - ~ServerInterface(); + virtual ~ServerInterface() override; void initialize(); void deinitialize(); diff --git a/modules/server/include/topics/bouncetopic.h b/modules/server/include/topics/bouncetopic.h index a0a57bdaf1..b37170466e 100644 --- a/modules/server/include/topics/bouncetopic.h +++ b/modules/server/include/topics/bouncetopic.h @@ -34,7 +34,7 @@ class Connection; class BounceTopic : public Topic { public: BounceTopic() = default; - virtual ~BounceTopic() = default; + ~BounceTopic() override = default; void handleJson(const nlohmann::json& json) override; bool isDone() const override; diff --git a/modules/server/include/topics/documentationtopic.h b/modules/server/include/topics/documentationtopic.h index aca596dccd..cde72d4bb7 100644 --- a/modules/server/include/topics/documentationtopic.h +++ b/modules/server/include/topics/documentationtopic.h @@ -32,7 +32,7 @@ namespace openspace { class DocumentationTopic : public Topic { public: DocumentationTopic() = default; - virtual ~DocumentationTopic() = default; + ~DocumentationTopic() override = default; void handleJson(const nlohmann::json& json) override; bool isDone() const override; diff --git a/modules/server/include/topics/enginemodetopic.h b/modules/server/include/topics/enginemodetopic.h index fbf4546c63..4ac64e12cc 100644 --- a/modules/server/include/topics/enginemodetopic.h +++ b/modules/server/include/topics/enginemodetopic.h @@ -34,7 +34,7 @@ namespace openspace { class EngineModeTopic : public Topic { public: EngineModeTopic(); - virtual ~EngineModeTopic(); + ~EngineModeTopic() override; void handleJson(const nlohmann::json& json) override; bool isDone() const override; diff --git a/modules/server/include/topics/flightcontrollertopic.h b/modules/server/include/topics/flightcontrollertopic.h index b0b782c855..edac931f5a 100644 --- a/modules/server/include/topics/flightcontrollertopic.h +++ b/modules/server/include/topics/flightcontrollertopic.h @@ -39,7 +39,7 @@ namespace openspace { class FlightControllerTopic : public Topic { public: FlightControllerTopic(); - ~FlightControllerTopic(); + ~FlightControllerTopic() override; void handleJson(const nlohmann::json& json) override; bool isDone() const override; diff --git a/modules/server/include/topics/getpropertytopic.h b/modules/server/include/topics/getpropertytopic.h index 3ea9ba1899..33a87f93e4 100644 --- a/modules/server/include/topics/getpropertytopic.h +++ b/modules/server/include/topics/getpropertytopic.h @@ -32,7 +32,7 @@ namespace openspace { class GetPropertyTopic : public Topic { public: GetPropertyTopic() = default; - virtual ~GetPropertyTopic() = default; + ~GetPropertyTopic() override = default; void handleJson(const nlohmann::json& json) override; bool isDone() const override; diff --git a/modules/server/include/topics/sessionrecordingtopic.h b/modules/server/include/topics/sessionrecordingtopic.h index 83f93a9bc1..21e4d7813a 100644 --- a/modules/server/include/topics/sessionrecordingtopic.h +++ b/modules/server/include/topics/sessionrecordingtopic.h @@ -34,7 +34,7 @@ namespace openspace { class SessionRecordingTopic : public Topic { public: SessionRecordingTopic(); - virtual ~SessionRecordingTopic(); + ~SessionRecordingTopic() override; void handleJson(const nlohmann::json& json) override; bool isDone() const override; diff --git a/modules/server/include/topics/setpropertytopic.h b/modules/server/include/topics/setpropertytopic.h index 8f427eaa9c..5168f4bca6 100644 --- a/modules/server/include/topics/setpropertytopic.h +++ b/modules/server/include/topics/setpropertytopic.h @@ -32,7 +32,7 @@ namespace openspace { class SetPropertyTopic : public Topic { public: SetPropertyTopic() = default; - virtual ~SetPropertyTopic() = default; + ~SetPropertyTopic() override = default; void handleJson(const nlohmann::json& json) override; bool isDone() const override; diff --git a/modules/server/include/topics/shortcuttopic.h b/modules/server/include/topics/shortcuttopic.h index f08c2bcf8d..f0f952e17a 100644 --- a/modules/server/include/topics/shortcuttopic.h +++ b/modules/server/include/topics/shortcuttopic.h @@ -31,7 +31,7 @@ namespace openspace { class ShortcutTopic : public Topic { public: - virtual ~ShortcutTopic() = default; + ~ShortcutTopic() override = default; void handleJson(const nlohmann::json& input) override; bool isDone() const override; diff --git a/modules/server/include/topics/skybrowsertopic.h b/modules/server/include/topics/skybrowsertopic.h index d2522b3618..a69b8adfa9 100644 --- a/modules/server/include/topics/skybrowsertopic.h +++ b/modules/server/include/topics/skybrowsertopic.h @@ -33,7 +33,7 @@ namespace openspace { class SkyBrowserTopic : public Topic { public: SkyBrowserTopic(); - virtual ~SkyBrowserTopic(); + ~SkyBrowserTopic() override; void handleJson(const nlohmann::json& json) override; bool isDone() const override; diff --git a/modules/server/include/topics/subscriptiontopic.h b/modules/server/include/topics/subscriptiontopic.h index d5067035c7..62e7b8c493 100644 --- a/modules/server/include/topics/subscriptiontopic.h +++ b/modules/server/include/topics/subscriptiontopic.h @@ -34,7 +34,7 @@ namespace openspace { class SubscriptionTopic : public Topic { public: SubscriptionTopic() = default; - ~SubscriptionTopic(); + ~SubscriptionTopic() override; void handleJson(const nlohmann::json& json) override; bool isDone() const override; diff --git a/modules/server/include/topics/timetopic.h b/modules/server/include/topics/timetopic.h index 52cc92e921..3aea39e987 100644 --- a/modules/server/include/topics/timetopic.h +++ b/modules/server/include/topics/timetopic.h @@ -33,7 +33,7 @@ namespace openspace { class TimeTopic : public Topic { public: TimeTopic(); - virtual ~TimeTopic(); + ~TimeTopic() override; void handleJson(const nlohmann::json& json) override; bool isDone() const override; diff --git a/modules/server/include/topics/triggerpropertytopic.h b/modules/server/include/topics/triggerpropertytopic.h index 42b99f3c6f..5dd8ad2354 100644 --- a/modules/server/include/topics/triggerpropertytopic.h +++ b/modules/server/include/topics/triggerpropertytopic.h @@ -32,7 +32,7 @@ namespace openspace { class TriggerPropertyTopic : public Topic { public: TriggerPropertyTopic() = default; - virtual ~TriggerPropertyTopic() = default; + ~TriggerPropertyTopic() override = default; void handleJson(const nlohmann::json& json) override; bool isDone() const override; diff --git a/modules/server/include/topics/versiontopic.h b/modules/server/include/topics/versiontopic.h index b82a0e9b2c..ddc90c1176 100644 --- a/modules/server/include/topics/versiontopic.h +++ b/modules/server/include/topics/versiontopic.h @@ -31,7 +31,7 @@ namespace openspace { class VersionTopic : public Topic { public: - virtual ~VersionTopic() = default; + ~VersionTopic() override = default; void handleJson(const nlohmann::json& json) override; bool isDone() const override; diff --git a/modules/server/servermodule.h b/modules/server/servermodule.h index 05f4686681..7f496cdd16 100644 --- a/modules/server/servermodule.h +++ b/modules/server/servermodule.h @@ -51,7 +51,7 @@ public: static constexpr const char* Name = "Server"; ServerModule(); - virtual ~ServerModule(); + virtual ~ServerModule() override; ServerInterface* serverInterfaceByIdentifier(const std::string& identifier); diff --git a/modules/skybrowser/ext/tinyxml2/tinyxml2.cpp b/modules/skybrowser/ext/tinyxml2/tinyxml2.cpp index 925cffd28c..b170df3b54 100644 --- a/modules/skybrowser/ext/tinyxml2/tinyxml2.cpp +++ b/modules/skybrowser/ext/tinyxml2/tinyxml2.cpp @@ -21,6 +21,11 @@ must not be misrepresented as being the original software. distribution. */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wold-style-cast" +#pragma GCC diagnostic ignored "-Wsuggest-override" +#pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant" + #include "tinyxml2.h" #include // yes, this one new style header, is in the Android SDK. @@ -2984,3 +2989,5 @@ bool XMLPrinter::Visit( const XMLUnknown& unknown ) } } // namespace tinyxml2 + +#pragma GCC diagnostic pop diff --git a/modules/skybrowser/include/screenspaceskybrowser.h b/modules/skybrowser/include/screenspaceskybrowser.h index 3156fb2022..6c470bed53 100644 --- a/modules/skybrowser/include/screenspaceskybrowser.h +++ b/modules/skybrowser/include/screenspaceskybrowser.h @@ -38,7 +38,7 @@ namespace openspace { class ScreenSpaceSkyBrowser : public ScreenSpaceRenderable, public WwtCommunicator { public: explicit ScreenSpaceSkyBrowser(const ghoul::Dictionary& dictionary); - ~ScreenSpaceSkyBrowser(); + ~ScreenSpaceSkyBrowser() override; bool initializeGL() override; bool deinitializeGL() override; diff --git a/modules/skybrowser/include/utility.h b/modules/skybrowser/include/utility.h index 2bac9ef650..f4dd71d441 100644 --- a/modules/skybrowser/include/utility.h +++ b/modules/skybrowser/include/utility.h @@ -199,11 +199,12 @@ glm::dmat4 incrementalAnimationMatrix(const glm::dvec3& start, const glm::dvec3& */ double sizeFromFov(double fov, glm::dvec3 worldPosition); -template +template class Animation { public: Animation(T start, T goal, double time) - : _start(start), _goal(goal) + : _goal(std::move(goal)) + , _start(std::move(start)) { _animationTime = std::chrono::milliseconds(static_cast(time * 1000)); } diff --git a/modules/skybrowser/include/wwtcommunicator.h b/modules/skybrowser/include/wwtcommunicator.h index cc31569cf6..eed5441892 100644 --- a/modules/skybrowser/include/wwtcommunicator.h +++ b/modules/skybrowser/include/wwtcommunicator.h @@ -39,7 +39,7 @@ class WwtCommunicator : public Browser { public: explicit WwtCommunicator(const ghoul::Dictionary& dictionary); WwtCommunicator(const WwtCommunicator&) = default; - ~WwtCommunicator(); + ~WwtCommunicator() override; void update(); diff --git a/modules/skybrowser/include/wwtdatahandler.h b/modules/skybrowser/include/wwtdatahandler.h index 83a8e93fce..b4b1280bcc 100644 --- a/modules/skybrowser/include/wwtdatahandler.h +++ b/modules/skybrowser/include/wwtdatahandler.h @@ -25,11 +25,16 @@ #ifndef __OPENSPACE_MODULE_SKYBROWSER___WWTDATAHANDLER___H__ #define __OPENSPACE_MODULE_SKYBROWSER___WWTDATAHANDLER___H__ -#include #include #include #include +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wsuggest-override" +#pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant" +#include +#pragma GCC diagnostic pop + namespace openspace::documentation { struct Documentation; } namespace openspace::wwt { diff --git a/modules/skybrowser/skybrowsermodule.cpp b/modules/skybrowser/skybrowsermodule.cpp index a3e6f05eef..0b3c4a98bb 100644 --- a/modules/skybrowser/skybrowsermodule.cpp +++ b/modules/skybrowser/skybrowsermodule.cpp @@ -169,7 +169,7 @@ SkyBrowserModule::SkyBrowserModule() // Set callback functions global::callback::mouseButton->emplace(global::callback::mouseButton->begin(), - [&](MouseButton button, MouseAction action, KeyModifier) -> bool { + [&](MouseButton, MouseAction action, KeyModifier) -> bool { if (action == MouseAction::Press) { _cameraRotation.stop(); } @@ -218,7 +218,7 @@ SkyBrowserModule::SkyBrowserModule() // Trigger callbacks (should maybe have a check to see if update is needed) using K = CallbackHandle; using V = CallbackFunction; - for (const std::pair& it : _preSyncCallbacks) { + for (const std::pair& it : _preSyncCallbacks) { it.second(); // call function } }); diff --git a/modules/skybrowser/skybrowsermodule.h b/modules/skybrowser/skybrowsermodule.h index 938ead2185..29e58d6afb 100644 --- a/modules/skybrowser/skybrowsermodule.h +++ b/modules/skybrowser/skybrowsermodule.h @@ -102,11 +102,11 @@ private: properties::BoolProperty _enabled; properties::BoolProperty _showTitleInGuiBrowser; properties::BoolProperty _allowCameraRotation; - properties::BoolProperty _hideTargetsBrowsersWithGui; - properties::BoolProperty _inverseZoomDirection; properties::DoubleProperty _cameraRotationSpeed; properties::DoubleProperty _targetAnimationSpeed; properties::DoubleProperty _browserAnimationSpeed; + properties::BoolProperty _hideTargetsBrowsersWithGui; + properties::BoolProperty _inverseZoomDirection; properties::DoubleProperty _spaceCraftAnimationTime; properties::StringProperty _wwtImageCollectionUrl; diff --git a/modules/skybrowser/skybrowsermodule_lua.inl b/modules/skybrowser/skybrowsermodule_lua.inl index 811bc881a8..b87b96712c 100644 --- a/modules/skybrowser/skybrowsermodule_lua.inl +++ b/modules/skybrowser/skybrowsermodule_lua.inl @@ -60,7 +60,7 @@ namespace { std::remove_if( str.begin(), str.end(), [](char c) { - return c < 0 || c >= 128; + return c < 0; } ), str.end() @@ -552,8 +552,6 @@ namespace { using namespace openspace; SkyBrowserModule* module = global::moduleEngine->module(); - const ImageData& image = module->getWwtDataHandler()->getImage(imageIndex); - TargetBrowserPair* pair = module->pair(identifier); if (pair) { pair->removeSelectedImage(imageIndex); diff --git a/modules/skybrowser/src/browser.cpp b/modules/skybrowser/src/browser.cpp index 2a5e70566b..e57f3cf1c9 100644 --- a/modules/skybrowser/src/browser.cpp +++ b/modules/skybrowser/src/browser.cpp @@ -80,13 +80,13 @@ void Browser::RenderHandler::setTexture(GLuint t) { } Browser::Browser(const ghoul::Dictionary& dictionary) - : _url(UrlInfo) - , _browserPixeldimensions( + : _browserPixeldimensions( DimensionsInfo, glm::vec2(500.f), glm::vec2(10.f), glm::vec2(3000.f) ) + , _url(UrlInfo) , _reload(ReloadInfo) { if (dictionary.hasValue(UrlInfo.identifier)) { diff --git a/modules/skybrowser/src/screenspaceskybrowser.cpp b/modules/skybrowser/src/screenspaceskybrowser.cpp index 33836824d0..e6bdbc517f 100644 --- a/modules/skybrowser/src/screenspaceskybrowser.cpp +++ b/modules/skybrowser/src/screenspaceskybrowser.cpp @@ -123,7 +123,6 @@ ScreenSpaceSkyBrowser::ScreenSpaceSkyBrowser(const ghoul::Dictionary& dictionary _textureQuality.onChange([this]() { _textureDimensionsIsDirty = true; }); if (global::windowDelegate->isMaster()) { - SkyBrowserModule* module = global::moduleEngine->module(); _borderColor = randomBorderColor(); } diff --git a/modules/skybrowser/src/targetbrowserpair.cpp b/modules/skybrowser/src/targetbrowserpair.cpp index 31af265375..aa02d8766a 100644 --- a/modules/skybrowser/src/targetbrowserpair.cpp +++ b/modules/skybrowser/src/targetbrowserpair.cpp @@ -44,8 +44,8 @@ namespace openspace { TargetBrowserPair::TargetBrowserPair(SceneGraphNode* targetNode, ScreenSpaceSkyBrowser* browser) - : _targetNode(targetNode) - , _browser(browser) + : _browser(browser) + , _targetNode(targetNode) { ghoul_assert(browser, "Sky browser is null pointer"); ghoul_assert(targetNode, "Sky target is null pointer"); diff --git a/modules/skybrowser/src/wwtdatahandler.cpp b/modules/skybrowser/src/wwtdatahandler.cpp index 07953546f3..f8a1b34b27 100644 --- a/modules/skybrowser/src/wwtdatahandler.cpp +++ b/modules/skybrowser/src/wwtdatahandler.cpp @@ -268,7 +268,7 @@ int WwtDataHandler::nLoadedImages() const { } const ImageData& WwtDataHandler::getImage(int i) const { - ghoul_assert(i < _images.size(), "Index outside of image vector boundaries"); + ghoul_assert(i < static_cast(_images.size()), "Index outside of vector size"); return _images[i]; } diff --git a/modules/space/rendering/planetgeometry.h b/modules/space/rendering/planetgeometry.h index 7b96f4dbcf..c5f5fcd4eb 100644 --- a/modules/space/rendering/planetgeometry.h +++ b/modules/space/rendering/planetgeometry.h @@ -43,7 +43,7 @@ public: ); PlanetGeometry(); - virtual ~PlanetGeometry() = default; + ~PlanetGeometry() override = default; virtual void initialize(); virtual void deinitialize(); virtual void render() = 0; diff --git a/modules/space/rendering/renderablestars.h b/modules/space/rendering/renderablestars.h index 93971f4748..d66c1e7658 100644 --- a/modules/space/rendering/renderablestars.h +++ b/modules/space/rendering/renderablestars.h @@ -52,7 +52,7 @@ namespace documentation { struct Documentation; } class RenderableStars : public Renderable { public: explicit RenderableStars(const ghoul::Dictionary& dictionary); - ~RenderableStars(); + ~RenderableStars() override; void initializeGL() override; void deinitializeGL() override; diff --git a/modules/space/rendering/simplespheregeometry.h b/modules/space/rendering/simplespheregeometry.h index fd08e1cb00..7b6f9848fb 100644 --- a/modules/space/rendering/simplespheregeometry.h +++ b/modules/space/rendering/simplespheregeometry.h @@ -42,7 +42,7 @@ namespace openspace::planetgeometry { class SimpleSphereGeometry : public PlanetGeometry { public: SimpleSphereGeometry(const ghoul::Dictionary& dictionary); - ~SimpleSphereGeometry(); + ~SimpleSphereGeometry() override; void initialize() override; void deinitialize() override; diff --git a/modules/space/spacemodule.h b/modules/space/spacemodule.h index 6c0541f625..00861b543c 100644 --- a/modules/space/spacemodule.h +++ b/modules/space/spacemodule.h @@ -37,7 +37,7 @@ public: constexpr static const char* Name = "Space"; SpaceModule(); - virtual ~SpaceModule() = default; + ~SpaceModule() override = default; std::vector documentations() const override; static ghoul::opengl::ProgramObjectManager ProgramObjectManager; diff --git a/modules/space/translation/keplertranslation.h b/modules/space/translation/keplertranslation.h index 08c2f8ef18..4813319c5b 100644 --- a/modules/space/translation/keplertranslation.h +++ b/modules/space/translation/keplertranslation.h @@ -61,7 +61,7 @@ public: KeplerTranslation(const ghoul::Dictionary& dictionary); /// Default destructor - virtual ~KeplerTranslation() = default; + ~KeplerTranslation() override = default; /** * Method returning the translation vector at a given time. diff --git a/modules/spacecraftinstruments/dashboard/dashboarditeminstruments.h b/modules/spacecraftinstruments/dashboard/dashboarditeminstruments.h index e18c1fce34..dcd63341ba 100644 --- a/modules/spacecraftinstruments/dashboard/dashboarditeminstruments.h +++ b/modules/spacecraftinstruments/dashboard/dashboarditeminstruments.h @@ -36,7 +36,7 @@ namespace openspace { class DashboardItemInstruments : public DashboardTextItem { public: DashboardItemInstruments(const ghoul::Dictionary& dictionary); - ~DashboardItemInstruments() = default; + ~DashboardItemInstruments() override = default; void render(glm::vec2& penPosition) override; diff --git a/modules/spacecraftinstruments/rendering/renderablemodelprojection.h b/modules/spacecraftinstruments/rendering/renderablemodelprojection.h index d09c1851a5..a198986d98 100644 --- a/modules/spacecraftinstruments/rendering/renderablemodelprojection.h +++ b/modules/spacecraftinstruments/rendering/renderablemodelprojection.h @@ -51,7 +51,7 @@ struct UpdateData; class RenderableModelProjection : public Renderable { public: RenderableModelProjection(const ghoul::Dictionary& dictionary); - ~RenderableModelProjection(); + ~RenderableModelProjection() override; void initializeGL() override; void deinitializeGL() override; diff --git a/modules/spacecraftinstruments/rendering/renderableplaneprojection.h b/modules/spacecraftinstruments/rendering/renderableplaneprojection.h index 43af1e4258..0bf56b9d3d 100644 --- a/modules/spacecraftinstruments/rendering/renderableplaneprojection.h +++ b/modules/spacecraftinstruments/rendering/renderableplaneprojection.h @@ -46,7 +46,7 @@ struct UpdateData; class RenderablePlaneProjection : public Renderable { public: RenderablePlaneProjection(const ghoul::Dictionary& dictionary); - ~RenderablePlaneProjection(); + ~RenderablePlaneProjection() override; void initializeGL() override; void deinitializeGL() override; diff --git a/modules/spacecraftinstruments/rendering/renderableplanetprojection.h b/modules/spacecraftinstruments/rendering/renderableplanetprojection.h index e0ef6cbfab..caf194aec5 100644 --- a/modules/spacecraftinstruments/rendering/renderableplanetprojection.h +++ b/modules/spacecraftinstruments/rendering/renderableplanetprojection.h @@ -44,7 +44,7 @@ namespace planetgeometry { class PlanetGeometry; } class RenderablePlanetProjection : public Renderable { public: RenderablePlanetProjection(const ghoul::Dictionary& dict); - ~RenderablePlanetProjection(); + ~RenderablePlanetProjection() override; void initializeGL() override; void deinitializeGL() override; diff --git a/modules/statemachine/statemachinemodule.h b/modules/statemachine/statemachinemodule.h index 44fb766e5c..5b726e1c8b 100644 --- a/modules/statemachine/statemachinemodule.h +++ b/modules/statemachine/statemachinemodule.h @@ -38,7 +38,7 @@ public: constexpr static const char* Name = "StateMachine"; StateMachineModule(); - ~StateMachineModule() = default; + ~StateMachineModule() override = default; void initializeStateMachine(const ghoul::Dictionary& states, const ghoul::Dictionary& transitions, diff --git a/modules/sync/syncs/httpsynchronization.h b/modules/sync/syncs/httpsynchronization.h index 68c039201a..513868064a 100644 --- a/modules/sync/syncs/httpsynchronization.h +++ b/modules/sync/syncs/httpsynchronization.h @@ -67,7 +67,7 @@ public: std::vector synchronizationRepositories); /// Destructor that will close the asynchronous file transfer, if it is still ongoing - virtual ~HttpSynchronization(); + ~HttpSynchronization() override; /** * Returns the location to which files downloaded through this ResourceSynchronization diff --git a/modules/sync/syncs/urlsynchronization.h b/modules/sync/syncs/urlsynchronization.h index 8747d7cf82..f7be555d9a 100644 --- a/modules/sync/syncs/urlsynchronization.h +++ b/modules/sync/syncs/urlsynchronization.h @@ -57,7 +57,7 @@ public: std::filesystem::path synchronizationRoot); /// Contructor that will terminate the synchronization thread if it is still running - virtual ~UrlSynchronization(); + ~UrlSynchronization() override; /** * Returns the location to which files downloaded through this ResourceSynchronization diff --git a/modules/toyvolume/rendering/renderabletoyvolume.h b/modules/toyvolume/rendering/renderabletoyvolume.h index 46e44d6b69..afa4f0d3f3 100644 --- a/modules/toyvolume/rendering/renderabletoyvolume.h +++ b/modules/toyvolume/rendering/renderabletoyvolume.h @@ -39,7 +39,7 @@ struct RenderData; class RenderableToyVolume : public Renderable { public: RenderableToyVolume(const ghoul::Dictionary& dictionary); - ~RenderableToyVolume(); + ~RenderableToyVolume() override; void initializeGL() override; void deinitializeGL() override; diff --git a/modules/toyvolume/rendering/toyvolumeraycaster.h b/modules/toyvolume/rendering/toyvolumeraycaster.h index f063ad236c..82f59d567e 100644 --- a/modules/toyvolume/rendering/toyvolumeraycaster.h +++ b/modules/toyvolume/rendering/toyvolumeraycaster.h @@ -44,7 +44,7 @@ struct RaycastData; class ToyVolumeRaycaster : public VolumeRaycaster { public: ToyVolumeRaycaster(glm::vec4 color); - virtual ~ToyVolumeRaycaster() = default; + ~ToyVolumeRaycaster() override = default; void initialize(); void deinitialize(); diff --git a/modules/volume/rendering/basicvolumeraycaster.h b/modules/volume/rendering/basicvolumeraycaster.h index 38ba4d668f..de4ee8904b 100644 --- a/modules/volume/rendering/basicvolumeraycaster.h +++ b/modules/volume/rendering/basicvolumeraycaster.h @@ -53,7 +53,7 @@ public: std::shared_ptr texture, std::shared_ptr transferFunction, std::shared_ptr clipPlanes); - virtual ~BasicVolumeRaycaster(); + ~BasicVolumeRaycaster() override; void initialize(); void deinitialize(); diff --git a/modules/volume/rendering/renderabletimevaryingvolume.h b/modules/volume/rendering/renderabletimevaryingvolume.h index 7061ab0325..34961057d5 100644 --- a/modules/volume/rendering/renderabletimevaryingvolume.h +++ b/modules/volume/rendering/renderabletimevaryingvolume.h @@ -50,7 +50,7 @@ class VolumeClipPlanes; class RenderableTimeVaryingVolume : public Renderable { public: RenderableTimeVaryingVolume(const ghoul::Dictionary& dictionary); - ~RenderableTimeVaryingVolume(); + ~RenderableTimeVaryingVolume() override; void initializeGL() override; void deinitializeGL() override; diff --git a/modules/volume/rendering/volumeclipplane.h b/modules/volume/rendering/volumeclipplane.h index 4633e1da98..76a9b3ae7b 100644 --- a/modules/volume/rendering/volumeclipplane.h +++ b/modules/volume/rendering/volumeclipplane.h @@ -37,7 +37,7 @@ namespace openspace::volume { class VolumeClipPlane : public properties::PropertyOwner { public: VolumeClipPlane(const ghoul::Dictionary& dictionary); - virtual ~VolumeClipPlane() = default; + ~VolumeClipPlane() override = default; glm::vec3 normal() const; glm::vec2 offsets() const; diff --git a/modules/volume/rendering/volumeclipplanes.h b/modules/volume/rendering/volumeclipplanes.h index 2939b40481..20b62ebc74 100644 --- a/modules/volume/rendering/volumeclipplanes.h +++ b/modules/volume/rendering/volumeclipplanes.h @@ -40,7 +40,7 @@ class VolumeClipPlane; class VolumeClipPlanes : public properties::PropertyOwner { public: VolumeClipPlanes(const ghoul::Dictionary& dictionary); - virtual ~VolumeClipPlanes() = default; + ~VolumeClipPlanes() override = default; void initialize(); void deinitialize(); diff --git a/modules/webbrowser/CMakeLists.txt b/modules/webbrowser/CMakeLists.txt index 98c7d33ddc..591a2bdbf7 100644 --- a/modules/webbrowser/CMakeLists.txt +++ b/modules/webbrowser/CMakeLists.txt @@ -57,7 +57,7 @@ cmake_policy(SET CMP0074 NEW) # Specify the CEF distribution version. # Release from 03/21/2022 verified to work on Windows. -set(CEF_VERSION "91.1.23+g04c8d56+chromium-91.0.4472.164") +set(CEF_VERSION "102.0.10+gf249b2e+chromium-102.0.5005.115") # Removing - micahnyc 03/21/2022 # 73.1.13 has an issue on MacOS: The GUI freezing upon interaction. @@ -107,6 +107,11 @@ add_subdirectory(${CEF_LIBCEF_DLL_WRAPPER_PATH} libcef_dll_wrapper) mark_as_advanced(CEF_DEBUG_INFO_FLAG USE_ATL USE_OFFICIAL_BUILD_SANDBOX USE_SANDBOX) +if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + # The CEF DLL wrapper is raising a lot of warnings on GCC + target_compile_options(libcef_dll_wrapper PRIVATE "-w") +endif () + ########################################################################################## # Add CEF client files @@ -281,7 +286,7 @@ list(APPEND deps "${CEF_RESOURCE_DIR}/${j}") endforeach() add_external_library_dependencies("${deps}") -if (UNIX) +if (UNIX AND NOT (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")) # Linux needs to have copies of CEF files in Resources/ in its build-type dir to avoid # the 'Couldn't mmap icu data file' runtime error file(COPY ${CEF_ROOT}/Resources/ diff --git a/modules/webbrowser/include/screenspacebrowser.h b/modules/webbrowser/include/screenspacebrowser.h index 35a6462d5b..3e4e488396 100644 --- a/modules/webbrowser/include/screenspacebrowser.h +++ b/modules/webbrowser/include/screenspacebrowser.h @@ -63,7 +63,7 @@ class WebKeyboardHandler; class ScreenSpaceBrowser : public ScreenSpaceRenderable { public: ScreenSpaceBrowser(const ghoul::Dictionary& dictionary); - virtual ~ScreenSpaceBrowser() = default; + ~ScreenSpaceBrowser() override = default; bool initializeGL() override; bool deinitializeGL() override; diff --git a/modules/webbrowser/include/webrenderhandler.h b/modules/webbrowser/include/webrenderhandler.h index fa23ad4feb..25175c555a 100644 --- a/modules/webbrowser/include/webrenderhandler.h +++ b/modules/webbrowser/include/webrenderhandler.h @@ -31,7 +31,7 @@ #ifdef _MSC_VER #pragma warning (push) #pragma warning (disable : 4100) -#elif __clang__ +#elif defined(__clang__) //#pragma clang diagnostic push //#pragma clang diagnostic ignored "-Wunused-variable" #endif // _MSC_VER @@ -40,7 +40,7 @@ #ifdef _MSC_VER #pragma warning (pop) -#elif __clang__ +#elif defined(__clang__) //#pragma clang diagnostic pop #endif // _MSC_VER diff --git a/modules/webbrowser/src/browserclient.cpp b/modules/webbrowser/src/browserclient.cpp index 1afe1eafc4..478b86a097 100644 --- a/modules/webbrowser/src/browserclient.cpp +++ b/modules/webbrowser/src/browserclient.cpp @@ -43,7 +43,7 @@ BrowserClient::BrowserClient(WebRenderHandler* handler, _lifeSpanHandler = browserLauncher; _requestHandler = browserLauncher; _contextMenuHandler = new BrowserClient::NoContextMenuHandler; -}; +} CefRefPtr BrowserClient::GetContextMenuHandler() { return _contextMenuHandler; diff --git a/modules/webbrowser/src/browserinstance.cpp b/modules/webbrowser/src/browserinstance.cpp index 954c5a12ed..986e6ed080 100644 --- a/modules/webbrowser/src/browserinstance.cpp +++ b/modules/webbrowser/src/browserinstance.cpp @@ -51,6 +51,8 @@ BrowserInstance::BrowserInstance(WebRenderHandler* renderer, _client = new BrowserClient(_renderHandler.get(), _keyboardHandler.get()); CefWindowInfo windowInfo; + // On Windows and MacOS this function takes a pointer as a parameter, but Linux + // requires this to be a long unsigned int, so we can't use nullptr here windowInfo.SetAsWindowless(0); CefBrowserSettings browserSettings; diff --git a/modules/webbrowser/src/screenspacebrowser.cpp b/modules/webbrowser/src/screenspacebrowser.cpp index d166b5e139..4bfd187d44 100644 --- a/modules/webbrowser/src/screenspacebrowser.cpp +++ b/modules/webbrowser/src/screenspacebrowser.cpp @@ -76,8 +76,8 @@ void ScreenSpaceBrowser::ScreenSpaceRenderHandler::setTexture(GLuint t) { ScreenSpaceBrowser::ScreenSpaceBrowser(const ghoul::Dictionary& dictionary) : ScreenSpaceRenderable(dictionary) - , _url(UrlInfo) , _dimensions(DimensionsInfo, glm::vec2(0.f), glm::vec2(0.f), glm::vec2(3000.f)) + , _url(UrlInfo) , _reload(ReloadInfo) { const Parameters p = codegen::bake(dictionary); diff --git a/modules/webbrowser/webbrowsermodule.cpp b/modules/webbrowser/webbrowsermodule.cpp index 5bca8245f4..de9c418b95 100644 --- a/modules/webbrowser/webbrowsermodule.cpp +++ b/modules/webbrowser/webbrowsermodule.cpp @@ -44,7 +44,7 @@ namespace { #ifdef _MSC_VER constexpr const char* SubprocessPath = "OpenSpace Helper.exe"; - #elif __APPLE__ + #elif defined(__APPLE__) constexpr const char* SubprocessPath = "../Frameworks/OpenSpace Helper.app/Contents/MacOS/OpenSpace Helper"; #else diff --git a/modules/webbrowser/webbrowsermodule.h b/modules/webbrowser/webbrowsermodule.h index f28535503a..05e336d0e0 100644 --- a/modules/webbrowser/webbrowsermodule.h +++ b/modules/webbrowser/webbrowsermodule.h @@ -49,7 +49,7 @@ public: static constexpr const char* Name = "WebBrowser"; WebBrowserModule(); - virtual ~WebBrowserModule() = default; + ~WebBrowserModule() override = default; void addBrowser(BrowserInstance*); void removeBrowser(BrowserInstance*); diff --git a/src/interaction/joystickcamerastates.cpp b/src/interaction/joystickcamerastates.cpp index ef8259dff7..4605baf7f6 100644 --- a/src/interaction/joystickcamerastates.cpp +++ b/src/interaction/joystickcamerastates.cpp @@ -238,7 +238,7 @@ void JoystickCameraStates::setAxisMapping(std::string joystickName, } // If the axis index is too big for the vector then resize it to have room - if (axis >= joystickCameraState->axisMapping.size()) { + if (axis >= static_cast(joystickCameraState->axisMapping.size())) { joystickCameraState->axisMapping.resize(axis + 1); joystickCameraState->prevAxisValues.resize(axis + 1); } @@ -266,7 +266,7 @@ void JoystickCameraStates::setAxisMappingProperty(std::string joystickName, } // If the axis index is too big for the vector then resize it to have room - if (axis >= joystickCameraState->axisMapping.size()) { + if (axis >= static_cast(joystickCameraState->axisMapping.size())) { joystickCameraState->axisMapping.resize(axis + 1); joystickCameraState->prevAxisValues.resize(axis + 1); } @@ -292,7 +292,7 @@ JoystickCameraStates::AxisInformation JoystickCameraStates::axisMapping( return dummy; } - if (axis >= joystick->axisMapping.size()) { + if (axis >= static_cast(joystick->axisMapping.size())) { JoystickCameraStates::AxisInformation dummy; return dummy; } @@ -309,7 +309,7 @@ void JoystickCameraStates::setDeadzone(const std::string& joystickName, int axis } // If the axis index is too big for the vector then resize it to have room - if (axis >= joystickCameraState->axisMapping.size()) { + if (axis >= static_cast(joystickCameraState->axisMapping.size())) { joystickCameraState->axisMapping.resize(axis + 1); joystickCameraState->prevAxisValues.resize(axis + 1); } @@ -323,7 +323,7 @@ float JoystickCameraStates::deadzone(const std::string& joystickName, int axis) return 0.f; } - if (axis >= joystick->axisMapping.size()) { + if (axis >= static_cast(joystick->axisMapping.size())) { return 0.f; } diff --git a/src/navigation/orbitalnavigator.cpp b/src/navigation/orbitalnavigator.cpp index 2cde53f61c..129101cdf8 100644 --- a/src/navigation/orbitalnavigator.cpp +++ b/src/navigation/orbitalnavigator.cpp @@ -312,7 +312,6 @@ OrbitalNavigator::IdleBehavior::IdleBehavior() , defaultBehavior(IdleBehaviorInfo) { addProperty(apply); - using Behavior = IdleBehavior::Behavior; defaultBehavior.addOptions({ { static_cast(Behavior::Orbit), IdleKeyOrbit }, { static_cast(Behavior::OrbitAtConstantLat), IdleKeyOrbitAtConstantLat }, diff --git a/src/rendering/luaconsole.cpp b/src/rendering/luaconsole.cpp index e01c6ca254..49058e5688 100644 --- a/src/rendering/luaconsole.cpp +++ b/src/rendering/luaconsole.cpp @@ -781,10 +781,9 @@ void LuaConsole::render() { } // Computes the location for right justified text on the same y height as the entry - auto locationForRightJustifiedText = [this, res](const std::string& text) { + auto locationForRightJustifiedText = [this, res, dpi](const std::string& text) { using namespace ghoul::fontrendering; - const float dpi = global::windowDelegate->osDpiScaling(); const glm::vec2 loc = glm::vec2( EntryFontSize * dpi / 2.f, res.y - _currentHeight + EntryFontSize * dpi diff --git a/support/cmake/set_openspace_compile_settings.cmake b/support/cmake/set_openspace_compile_settings.cmake index b8f9db34fb..d3020216a9 100644 --- a/support/cmake/set_openspace_compile_settings.cmake +++ b/support/cmake/set_openspace_compile_settings.cmake @@ -78,7 +78,6 @@ function (set_openspace_compile_settings target) "-Wbitfield-constant-conversion" "-Wbool-conversions" "-Wcast-align" - "-Wcast-function-type" "-Wcast-qual" "-Wcomma" "-Wconditional-uninitialized" @@ -143,7 +142,7 @@ function (set_openspace_compile_settings target) "-Wvla" "-Wzero-as-null-pointer-constant" - "-Wno-attributes=codegen::" + "-Wno-attributes" "-Wno-missing-braces" "-Wno-unknown-attributes" )