diff --git a/apps/OpenSpace/ext/launcher/include/profile/actiondialog.h b/apps/OpenSpace/ext/launcher/include/profile/actiondialog.h index 2b840380c2..c08964631f 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/actiondialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/actiondialog.h @@ -38,7 +38,7 @@ class QListWidget; class QPushButton; class QTextEdit; -class ActionDialog : public QDialog { +class ActionDialog final : public QDialog { Q_OBJECT public: ActionDialog(QWidget* parent, diff --git a/apps/OpenSpace/ext/launcher/include/profile/additionalscriptsdialog.h b/apps/OpenSpace/ext/launcher/include/profile/additionalscriptsdialog.h index 661a81496e..40c330d9dd 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/additionalscriptsdialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/additionalscriptsdialog.h @@ -29,7 +29,7 @@ class QTextEdit; -class AdditionalScriptsDialog : public QDialog { +class AdditionalScriptsDialog final : public QDialog { Q_OBJECT public: /** diff --git a/apps/OpenSpace/ext/launcher/include/profile/assetsdialog.h b/apps/OpenSpace/ext/launcher/include/profile/assetsdialog.h index c3a06e6c12..e11c110d55 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/assetsdialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/assetsdialog.h @@ -32,7 +32,7 @@ class QTextEdit; class QTreeView; -class AssetsDialog : public QDialog { +class AssetsDialog final : public QDialog { Q_OBJECT public: /** diff --git a/apps/OpenSpace/ext/launcher/include/profile/assettreemodel.h b/apps/OpenSpace/ext/launcher/include/profile/assettreemodel.h index cce942a2d4..bfe3db62c7 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/assettreemodel.h +++ b/apps/OpenSpace/ext/launcher/include/profile/assettreemodel.h @@ -31,7 +31,7 @@ #include "openspace/scene/profile.h" #include -class AssetTreeModel : public QAbstractItemModel { +class AssetTreeModel final : public QAbstractItemModel { Q_OBJECT public: @@ -45,7 +45,7 @@ public: * function (can be multiple times) * \return QVariant data object */ - QVariant data(const QModelIndex& index, int role) const override; + QVariant data(const QModelIndex& index, int role) const final; /** * Returns the header data of the tree view @@ -57,7 +57,7 @@ public: * \return QVariant data object in the header */ QVariant headerData(int section, Qt::Orientation orientation, - int role = Qt::DisplayRole) const override; + int role = Qt::DisplayRole) const final; /** * Returns the index of item in #QModelIndex object form @@ -68,7 +68,7 @@ public: * \return #QModelIndex index of the item at specified position */ QModelIndex index(int row, int column, - const QModelIndex& parent = QModelIndex()) const override; + const QModelIndex& parent = QModelIndex()) const final; /** * Returns the index of the parent of the item specified by input param @@ -76,7 +76,7 @@ public: * \param index of item that is a child of the parent * \return #QModelIndex index of the parent */ - QModelIndex parent(const QModelIndex& index) const override; + QModelIndex parent(const QModelIndex& index) const final; /** * Returns the index of the parent of the item specified by the input params @@ -103,7 +103,7 @@ public: * \param parent #QModelIndex of the parent item * \return number of children/rows of this parent */ - int rowCount(const QModelIndex& parent = QModelIndex()) const override; + int rowCount(const QModelIndex& parent = QModelIndex()) const final; /** * Returns the number of columns of data in each item of the tree @@ -111,7 +111,7 @@ public: * \param parent specified by the #QModelIndex index * \return the number of data columns */ - int columnCount(const QModelIndex& parent = QModelIndex()) const override; + int columnCount(const QModelIndex& parent = QModelIndex()) const final; /** * Return the Qt flags of the item specified by index, which can include @@ -120,7 +120,7 @@ public: * \param index specified by the #QModelIndex index * \return the Qt flags */ - Qt::ItemFlags flags(const QModelIndex& index) const override; + Qt::ItemFlags flags(const QModelIndex& index) const final; /** * Set data at index \p index @@ -131,7 +131,7 @@ public: * \return true if the data set was successful */ bool setData(const QModelIndex& index, const QVariant& value, - int role = Qt::EditRole) override; + int role = Qt::EditRole) final; /** * Returns a vector of all #Assets selected in the tree view diff --git a/apps/OpenSpace/ext/launcher/include/profile/cameradialog.h b/apps/OpenSpace/ext/launcher/include/profile/cameradialog.h index a82211e5f2..3f60f6953a 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/cameradialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/cameradialog.h @@ -34,7 +34,7 @@ class QLabel; class QLineEdit; class QTabWidget; -class CameraDialog : public QDialog { +class CameraDialog final : public QDialog { Q_OBJECT public: /** diff --git a/apps/OpenSpace/ext/launcher/include/profile/deltatimesdialog.h b/apps/OpenSpace/ext/launcher/include/profile/deltatimesdialog.h index b366f1c57c..76c9184c25 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/deltatimesdialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/deltatimesdialog.h @@ -33,7 +33,7 @@ class QListWidget; class QLineEdit; class QPushButton; -class DeltaTimesDialog : public QDialog { +class DeltaTimesDialog final : public QDialog { Q_OBJECT public: /** diff --git a/apps/OpenSpace/ext/launcher/include/profile/marknodesdialog.h b/apps/OpenSpace/ext/launcher/include/profile/marknodesdialog.h index 5524a807a3..8ff3fd7cd6 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/marknodesdialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/marknodesdialog.h @@ -32,7 +32,7 @@ class QListWidget; class QListWidgetItem; class QPushButton; -class MarkNodesDialog : public QDialog { +class MarkNodesDialog final : public QDialog { Q_OBJECT public: /** diff --git a/apps/OpenSpace/ext/launcher/include/profile/metadialog.h b/apps/OpenSpace/ext/launcher/include/profile/metadialog.h index e369054d7f..b8d784aabb 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/metadialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/metadialog.h @@ -33,7 +33,7 @@ class QLineEdit; class QTextEdit; -class MetaDialog : public QDialog { +class MetaDialog final : public QDialog { Q_OBJECT public: /** diff --git a/apps/OpenSpace/ext/launcher/include/profile/modulesdialog.h b/apps/OpenSpace/ext/launcher/include/profile/modulesdialog.h index f43867c891..4245e5ff88 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/modulesdialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/modulesdialog.h @@ -35,7 +35,7 @@ class QLineEdit; class QListWidget; class QPushButton; -class ModulesDialog : public QDialog { +class ModulesDialog final : public QDialog { Q_OBJECT public: /** diff --git a/apps/OpenSpace/ext/launcher/include/profile/profileedit.h b/apps/OpenSpace/ext/launcher/include/profile/profileedit.h index 2f7a655a09..f83fa1f458 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/profileedit.h +++ b/apps/OpenSpace/ext/launcher/include/profile/profileedit.h @@ -36,7 +36,7 @@ class QLabel; class QLineEdit; class QTextEdit; -class ProfileEdit : public QDialog { +class ProfileEdit final : public QDialog { Q_OBJECT public: /** diff --git a/apps/OpenSpace/ext/launcher/include/profile/propertiesdialog.h b/apps/OpenSpace/ext/launcher/include/profile/propertiesdialog.h index 6e27c30b95..c3ce1a1402 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/propertiesdialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/propertiesdialog.h @@ -36,7 +36,7 @@ class QLineEdit; class QListWidget; class QPushButton; -class PropertiesDialog : public QDialog { +class PropertiesDialog final : public QDialog { Q_OBJECT public: /** diff --git a/apps/OpenSpace/ext/launcher/include/profile/scriptlogdialog.h b/apps/OpenSpace/ext/launcher/include/profile/scriptlogdialog.h index cec9bd3a52..dc970494f5 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/scriptlogdialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/scriptlogdialog.h @@ -28,7 +28,7 @@ #include #include -class ScriptlogDialog : public QDialog { +class ScriptlogDialog final : public QDialog { Q_OBJECT public: /** diff --git a/apps/OpenSpace/ext/launcher/include/profile/timedialog.h b/apps/OpenSpace/ext/launcher/include/profile/timedialog.h index 244b3cfd53..81ddf0d144 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/timedialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/timedialog.h @@ -34,7 +34,7 @@ class QDateTimeEdit; class QLabel; class QLineEdit; -class TimeDialog : public QDialog { +class TimeDialog final : public QDialog { Q_OBJECT public: /** diff --git a/apps/OpenSpace/ext/launcher/src/profile/actiondialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/actiondialog.cpp index 54ad1112a1..2edd32ed2a 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/actiondialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/actiondialog.cpp @@ -65,8 +65,8 @@ ActionDialog::ActionDialog(QWidget* parent, std::vector* keybindings) : QDialog(parent) , _actions(actions) - , _keybindings(keybindings) , _actionData(*_actions) + , _keybindings(keybindings) , _keybindingsData(*_keybindings) { setWindowTitle("Actions and Keybindings"); @@ -512,9 +512,7 @@ void ActionDialog::actionSaved() { const auto it = std::find_if( _actionData.begin(), _actionData.end(), - [id = newIdentifier](const Profile::Action& action) { - return action.identifier == id; - } + [id = newIdentifier](const Profile::Action& a) { return a.identifier == id; } ); if (it != _actionData.end()) { QMessageBox::critical( diff --git a/apps/OpenSpace/ext/sgct b/apps/OpenSpace/ext/sgct index 2a3ef78f72..f295ad95d0 160000 --- a/apps/OpenSpace/ext/sgct +++ b/apps/OpenSpace/ext/sgct @@ -1 +1 @@ -Subproject commit 2a3ef78f721e919531bb05b0cedab2dabe2bb0be +Subproject commit f295ad95d08caf18a2128c032c5179249bc36716 diff --git a/apps/OpenSpace/main.cpp b/apps/OpenSpace/main.cpp index dfd8b32c52..063057d6a5 100644 --- a/apps/OpenSpace/main.cpp +++ b/apps/OpenSpace/main.cpp @@ -960,7 +960,7 @@ void checkCommandLineForSettings(int& argc, char** argv, bool& hasSGCT, bool& ha } std::string setWindowConfigPresetForGui(const std::string labelFromCfgFile, - const std::string xmlExt, bool haveCliSGCTConfig, + bool haveCliSGCTConfig, const std::string& sgctFunctionName) { configuration::Configuration& config = *global::configuration; @@ -1046,8 +1046,9 @@ int main(int argc, char* argv[]) { // // Parse commandline arguments // + char* prgName = argv[0]; ghoul::cmdparser::CommandlineParser parser( - std::string(argv[0]), + std::string(prgName), ghoul::cmdparser::CommandlineParser::AllowUnknownCommands::Yes ); @@ -1159,7 +1160,6 @@ int main(int argc, char* argv[]) { const std::string xmlExt = ".xml"; std::string windowCfgPreset = setWindowConfigPresetForGui( labelFromCfgFile, - xmlExt, hasSGCTConfig, sgctFunctionName ); diff --git a/apps/Wormhole/main.cpp b/apps/Wormhole/main.cpp index f38d7f130a..1faa0b7c5d 100644 --- a/apps/Wormhole/main.cpp +++ b/apps/Wormhole/main.cpp @@ -129,4 +129,4 @@ int main(int argc, char** argv) { LINFO("Server stopped"); return 0; -}; +} diff --git a/ext/ghoul b/ext/ghoul index 350c0f6ec9..427a674d35 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit 350c0f6ec9df6bbaf3790109188d6c97600fb60d +Subproject commit 427a674d3561dae5e0d67a18ce410765ff61040b diff --git a/include/openspace/properties/templateproperty.h b/include/openspace/properties/templateproperty.h index a9ccd7a8b7..7ad5423c4a 100644 --- a/include/openspace/properties/templateproperty.h +++ b/include/openspace/properties/templateproperty.h @@ -87,7 +87,7 @@ public: * * \param value The value that is used to set this Property */ - virtual void set(std::any value) override; + virtual void set(std::any value) final; /** * Returns the std::type_info describing the template parameter diff --git a/include/openspace/rendering/framebufferrenderer.h b/include/openspace/rendering/framebufferrenderer.h index f88e6460c3..b4207b8dcf 100644 --- a/include/openspace/rendering/framebufferrenderer.h +++ b/include/openspace/rendering/framebufferrenderer.h @@ -94,9 +94,9 @@ public: virtual void updateRendererData(); virtual void raycastersChanged(VolumeRaycaster& raycaster, - RaycasterListener::IsAttached attached); + RaycasterListener::IsAttached attached) override; virtual void deferredcastersChanged(Deferredcaster& deferredcaster, - DeferredcasterListener::IsAttached isAttached); + DeferredcasterListener::IsAttached isAttached) override; private: using RaycasterProgObjMap = std::map< diff --git a/include/openspace/scene/sceneinitializer.h b/include/openspace/scene/sceneinitializer.h index 9f7eff48e6..1439f227e3 100644 --- a/include/openspace/scene/sceneinitializer.h +++ b/include/openspace/scene/sceneinitializer.h @@ -41,7 +41,7 @@ public: virtual bool isInitializing() const = 0; }; -class SingleThreadedSceneInitializer : public SceneInitializer { +class SingleThreadedSceneInitializer final : public SceneInitializer { public: void initializeNode(SceneGraphNode* node) override; std::vector takeInitializedNodes() override; @@ -51,7 +51,7 @@ private: std::vector _initializedNodes; }; -class MultiThreadedSceneInitializer : public SceneInitializer { +class MultiThreadedSceneInitializer final : public SceneInitializer { public: MultiThreadedSceneInitializer(unsigned int nThreads); diff --git a/modules/base/rendering/renderabletrail.cpp b/modules/base/rendering/renderabletrail.cpp index 509be6db13..12f3b1f305 100644 --- a/modules/base/rendering/renderabletrail.cpp +++ b/modules/base/rendering/renderabletrail.cpp @@ -338,7 +338,6 @@ void RenderableTrail::internalRender(bool renderLines, bool renderPoints, _programObject->setUniform(_uniformCache.nVertices, nVertices); #if !defined(__APPLE__) - glm::ivec2 resolution = global::renderEngine->renderingResolution(); GLint viewport[4]; global::renderEngine->openglStateCache().viewport(viewport); _programObject->setUniform( diff --git a/modules/debugging/debuggingmodule_lua.inl b/modules/debugging/debuggingmodule_lua.inl index 36c9928b05..0d00abd3b2 100644 --- a/modules/debugging/debuggingmodule_lua.inl +++ b/modules/debugging/debuggingmodule_lua.inl @@ -170,7 +170,7 @@ int renderCameraPath(lua_State* L) { addDirectionLine(pointIdentifier(0), poses.front()); } - for (int i = 1; i < poses.size(); i++) { + for (int i = 1; i < static_cast(poses.size()); i++) { addPoint(pointIdentifier(i), poses[i].position); addLineBetweenPoints(pointIdentifier(i), pointIdentifier(i - 1), PathColor, 4.f); diff --git a/modules/exoplanets/exoplanetsmodule.cpp b/modules/exoplanets/exoplanetsmodule.cpp index f65a905e47..2f483cd099 100644 --- a/modules/exoplanets/exoplanetsmodule.cpp +++ b/modules/exoplanets/exoplanetsmodule.cpp @@ -200,13 +200,13 @@ std::string ExoplanetsModule::exoplanetsDataPath() const { return absPath( fmt::format("{}/{}", _exoplanetsDataFolder.value(), ExoplanetsDataFileName) ).string(); -}; +} std::string ExoplanetsModule::lookUpTablePath() const { return absPath( fmt::format("{}/{}", _exoplanetsDataFolder, LookupTableFileName) ).string(); -}; +} std::string ExoplanetsModule::bvColormapPath() const { return _bvColorMapPath; diff --git a/modules/globebrowsing/src/timequantizer.cpp b/modules/globebrowsing/src/timequantizer.cpp index 5317be039e..00a086d352 100644 --- a/modules/globebrowsing/src/timequantizer.cpp +++ b/modules/globebrowsing/src/timequantizer.cpp @@ -370,8 +370,8 @@ void TimeQuantizer::setResolution(const std::string& resolutionString) { } void TimeQuantizer::verifyStartTimeRestrictions() { - //If monthly time resolution then restrict to 28 days so every month is consistent - unsigned int dayUpperLimit; + // If monthly time resolution then restrict to 28 days so every month is consistent + int dayUpperLimit; std::string helpfulDescription = "the selected month"; if (_resolutionUnit == 'M') { dayUpperLimit = 28; @@ -631,7 +631,6 @@ std::vector TimeQuantizer::quantized(Time& start, Time& end) { const double startSeconds = s.J2000(); const double endSeconds = e.J2000(); const double delta = endSeconds - startSeconds; - ghoul_assert( static_cast(delta) % static_cast(_resolution) == 0, "Quantization error" diff --git a/modules/space/rendering/renderablesmallbody.cpp b/modules/space/rendering/renderablesmallbody.cpp index 3236bab79a..e3aa129911 100644 --- a/modules/space/rendering/renderablesmallbody.cpp +++ b/modules/space/rendering/renderablesmallbody.cpp @@ -134,8 +134,7 @@ RenderableSmallBody::RenderableSmallBody(const ghoul::Dictionary& dictionary) } if (dictionary.hasValue(ContiguousModeInfo.identifier)) { - _contiguousMode = static_cast( - dictionary.value(ContiguousModeInfo.identifier)); + _contiguousMode = dictionary.value(ContiguousModeInfo.identifier); } else { _contiguousMode = false; diff --git a/modules/statemachine/include/state.h b/modules/statemachine/include/state.h index 9790697830..32adb27a17 100644 --- a/modules/statemachine/include/state.h +++ b/modules/statemachine/include/state.h @@ -52,4 +52,4 @@ private: } // namespace openspace -#endif __OPENSPACE_MODULE_STATEMACHINE___STATE___H__ +#endif // __OPENSPACE_MODULE_STATEMACHINE___STATE___H__ diff --git a/modules/statemachine/include/statemachine.h b/modules/statemachine/include/statemachine.h index d1cc9e5ecb..a1a994b089 100644 --- a/modules/statemachine/include/statemachine.h +++ b/modules/statemachine/include/statemachine.h @@ -68,4 +68,4 @@ private: } // namespace openspace -#endif __OPENSPACE_MODULE_STATEMACHINE___STATEMACHINE___H__ +#endif // __OPENSPACE_MODULE_STATEMACHINE___STATEMACHINE___H__ diff --git a/modules/statemachine/include/transition.h b/modules/statemachine/include/transition.h index 7dd5932386..52761e0df1 100644 --- a/modules/statemachine/include/transition.h +++ b/modules/statemachine/include/transition.h @@ -51,4 +51,4 @@ private: } // namespace openspace -#endif __OPENSPACE_MODULE_STATEMACHINE___TRANSITION___H__ +#endif // __OPENSPACE_MODULE_STATEMACHINE___TRANSITION___H__ diff --git a/modules/statemachine/statemachinemodule.h b/modules/statemachine/statemachinemodule.h index 0489cd117d..096ced7435 100644 --- a/modules/statemachine/statemachinemodule.h +++ b/modules/statemachine/statemachinemodule.h @@ -70,4 +70,4 @@ private: } // namespace openspace -#endif __OPENSPACE_MODULE_STATEMACHINE___STATEMACHINEMODULE___H__ +#endif // __OPENSPACE_MODULE_STATEMACHINE___STATEMACHINEMODULE___H__ diff --git a/src/engine/globals.cpp b/src/engine/globals.cpp index 2d3c5a10dc..79667a34bd 100644 --- a/src/engine/globals.cpp +++ b/src/engine/globals.cpp @@ -276,7 +276,7 @@ void create() { actionManager = new (currentPos) interaction::ActionManager; ghoul_assert(actionManager, "No action manager"); currentPos += sizeof(interaction::ActionManager); -#else ^^^ WIN32 / !WIN32 vvv +#else // ^^^ WIN32 / !WIN32 vvv actionManager = new interaction::ActionManager; #endif // WIN32 diff --git a/src/interaction/tasks/convertrecformattask.cpp b/src/interaction/tasks/convertrecformattask.cpp index 505d7dc8ae..c028d34fd2 100644 --- a/src/interaction/tasks/convertrecformattask.cpp +++ b/src/interaction/tasks/convertrecformattask.cpp @@ -105,21 +105,19 @@ void ConvertRecFormatTask::convert() { expectedFileExtension_out = SessionRecording::FileExtensionBinary; } - if (std::filesystem::path(_inFilePath).extension() != expectedFileExtension_in) { + if (_inFilePath.extension() != expectedFileExtension_in) { LWARNING(fmt::format( "Input filename doesn't have expected {} format file extension", currentFormat )); } - if (std::filesystem::path(_outFilePath).extension() == expectedFileExtension_in) { + if (_outFilePath.extension() == expectedFileExtension_in) { LERROR(fmt::format( "Output filename has {} file extension, but is conversion from {}", currentFormat, currentFormat )); return; } - else if (std::filesystem::path(_outFilePath).extension() != - expectedFileExtension_out) - { + else if (_outFilePath.extension() != expectedFileExtension_out) { _outFilePath += expectedFileExtension_out; } diff --git a/src/navigation/navigationstate.cpp b/src/navigation/navigationstate.cpp index de2a28e4db..52a0346170 100644 --- a/src/navigation/navigationstate.cpp +++ b/src/navigation/navigationstate.cpp @@ -121,8 +121,7 @@ CameraPose NavigationState::cameraPose() const { const glm::dvec3 anchorWorldPosition = anchorNode->worldPosition(); const glm::dmat3 referenceFrameTransform = referenceFrameNode->worldRotationMatrix(); - resultingPose.position = anchorWorldPosition + - glm::dvec3(referenceFrameTransform * glm::dvec4(position, 1.0)); + resultingPose.position = anchorWorldPosition + referenceFrameTransform * position; glm::dvec3 upVector = up.has_value() ? glm::normalize(referenceFrameTransform * up.value()) : diff --git a/src/navigation/orbitalnavigator.cpp b/src/navigation/orbitalnavigator.cpp index a33bf4bfa4..d8cbed89d7 100644 --- a/src/navigation/orbitalnavigator.cpp +++ b/src/navigation/orbitalnavigator.cpp @@ -572,7 +572,7 @@ void OrbitalNavigator::updateCameraStateFromStates(double deltaTime) { // Calculate a position handle based on the camera position in world space glm::dvec3 camPosToAnchorPosDiff = prevCameraPosition - anchorPos; // Use the interaction sphere to get an approximate distance to the node surface - double nodeRadius = static_cast(_anchorNode->interactionSphere()); + double nodeRadius = _anchorNode->interactionSphere(); double distFromCameraToFocus = glm::distance(prevCameraPosition, anchorPos) - nodeRadius; diff --git a/src/scene/profile.cpp b/src/scene/profile.cpp index b2f14fc04f..bbb1e2e1f1 100644 --- a/src/scene/profile.cpp +++ b/src/scene/profile.cpp @@ -498,12 +498,8 @@ void convertVersion10to11(nlohmann::json& profile) { return; } - // This needs to be changed if there is another version for any of these types later - using Action = Profile::Action; - using Keybinding = Profile::Keybinding; - - std::vector actions; - std::vector keybindings; + std::vector actions; + std::vector keybindings; std::vector kbs = profile.at("keybindings").get>(); @@ -511,7 +507,7 @@ void convertVersion10to11(nlohmann::json& profile) { version10::Keybinding& kb = kbs[i]; std::string identifier = fmt::format("profile.keybind.{}", i); - Action action; + Profile::Action action; action.identifier = identifier; action.documentation = std::move(kb.documentation); action.name = std::move(kb.name); @@ -520,7 +516,7 @@ void convertVersion10to11(nlohmann::json& profile) { action.script = std::move(kb.script); actions.push_back(std::move(action)); - Keybinding keybinding; + Profile::Keybinding keybinding; keybinding.key = kb.key; keybinding.action = identifier; keybindings.push_back(keybinding); diff --git a/src/util/collisionhelper.cpp b/src/util/collisionhelper.cpp index 411db611ef..1366e2f293 100644 --- a/src/util/collisionhelper.cpp +++ b/src/util/collisionhelper.cpp @@ -50,9 +50,7 @@ bool lineSphereIntersection(glm::dvec3 p1, glm::dvec3 p2, glm::dvec3 center, // Intersection else { // Only care about the first intersection point if we have two - const double t = static_cast( - (-b - std::sqrt(intersectionTest)) / (2.0 * a) - ); + const double t = (-b - std::sqrt(intersectionTest)) / (2.0 * a); // Check if utside of line segment between p1 and p2 if (t <= 0 || t >= 1.0) { diff --git a/src/util/httprequest.cpp b/src/util/httprequest.cpp index fe5c982b7d..76f56c3cb4 100644 --- a/src/util/httprequest.cpp +++ b/src/util/httprequest.cpp @@ -406,21 +406,19 @@ bool HttpFileDownload::initDownload() { char buffer[255]; LERROR(fmt::format( "Cannot open file '{}': {}", - std::string(_destination), + _destination, std::string(strerror_r(errno, buffer, sizeof(buffer))) )); return false; #else LERROR(fmt::format( - "Cannot open file '{}': {}", - std::string(_destination), - std::string(strerror(errno)) + "Cannot open file '{}': {}", _destination, std::string(strerror(errno)) )); return false; #endif } - LERROR(fmt::format("Cannot open file {}", std::string(_destination))); + LERROR(fmt::format("Cannot open file {}", _destination)); return false; #endif } diff --git a/src/util/spicemanager.cpp b/src/util/spicemanager.cpp index f5defa1f1c..b5500e1690 100644 --- a/src/util/spicemanager.cpp +++ b/src/util/spicemanager.cpp @@ -231,7 +231,7 @@ SpiceManager::KernelHandle SpiceManager::loadKernel(std::string filePath) { // kernels std::filesystem::path currentDirectory = std::filesystem::current_path(); - std::filesystem::path p = std::filesystem::path(path).parent_path(); + std::filesystem::path p = path.parent_path(); std::filesystem::current_path(p); LINFO(fmt::format("Loading SPICE kernel {}", path)); @@ -245,7 +245,7 @@ SpiceManager::KernelHandle SpiceManager::loadKernel(std::string filePath) { throwSpiceError("Kernel loading"); } - std::filesystem::path fileExtension = std::filesystem::path(path).extension(); + std::filesystem::path fileExtension = path.extension(); if (fileExtension == ".bc" || fileExtension == ".BC") { findCkCoverage(path.string()); // binary ck kernel } diff --git a/support/cmake/set_openspace_compile_settings.cmake b/support/cmake/set_openspace_compile_settings.cmake index 2dc978d17f..2cfd0a2e97 100644 --- a/support/cmake/set_openspace_compile_settings.cmake +++ b/support/cmake/set_openspace_compile_settings.cmake @@ -172,7 +172,7 @@ function (set_openspace_compile_settings target) "-Wvla" "-Wzero-length-array" "-Wno-missing-braces" - "-Wno-unknown-attributes" + "-Wno-ignored-attributes" ) if (OPENSPACE_WARNINGS_AS_ERRORS) set(CLANG_WARNINGS ${CLANG_WARNINGS} "-Werror") @@ -186,9 +186,6 @@ function (set_openspace_compile_settings target) "-Wpedantic" "-Wunused-parameter" "-Wuninitialized" - "-Wsuggest-attribute=const" - "-Wsuggest-final-types" - "-Wsuggest-final-methods" "-Wsuggest-override" "-Walloc-zero" "-Wduplicated-cond" diff --git a/support/coding/codegen b/support/coding/codegen index 49199f28e9..9b0d5a2b0a 160000 --- a/support/coding/codegen +++ b/support/coding/codegen @@ -1 +1 @@ -Subproject commit 49199f28e90dbd94df45f4f0b736aceb11cf4f82 +Subproject commit 9b0d5a2b0a06257640e9cd3df39084482252a8a2 diff --git a/tests/test_concurrentjobmanager.cpp b/tests/test_concurrentjobmanager.cpp index 552c212366..4eb7888cdc 100644 --- a/tests/test_concurrentjobmanager.cpp +++ b/tests/test_concurrentjobmanager.cpp @@ -34,13 +34,13 @@ namespace { : _jobExecutingTime(jobExecutingTime) {} - virtual void execute() { + virtual void execute() override { std::this_thread::sleep_for(std::chrono::milliseconds(_jobExecutingTime)); prod = 1337; } - virtual int product() { - return int(prod); + virtual int product() override { + return prod; } private: @@ -64,12 +64,12 @@ namespace { , _product(-1) {} - virtual void execute() { + virtual void execute() override { std::this_thread::sleep_for(std::chrono::milliseconds(_jobExecutingTime)); _product = VerboseProduct(1337); } - virtual VerboseProduct product() { + virtual VerboseProduct product() override { return _product; } diff --git a/tests/test_timequantizer.cpp b/tests/test_timequantizer.cpp index 6f7f777a77..e48e8e0b58 100644 --- a/tests/test_timequantizer.cpp +++ b/tests/test_timequantizer.cpp @@ -34,17 +34,6 @@ using namespace openspace; namespace { - constexpr const int FILLEN = 128; - constexpr const int TYPLEN = 32; - constexpr const int SRCLEN = 128; - - namespace spicemanager_constants { - const int nrMetaKernels = 9; - SpiceInt which, handle, count = 0; - char file[FILLEN], filtyp[TYPLEN], source[SRCLEN]; - double abs_error = 0.00001; - } // namespace spicemanager_constants - int loadLSKKernel() { int kernelID = openspace::SpiceManager::ref().loadKernel( absPath("${TESTDIR}/SpiceTest/spicekernels/naif0008.tls").string()