From 6b20d114c8f49cf51423e4f9d95392907c57e38a Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Mon, 8 Dec 2025 20:13:31 +0100 Subject: [PATCH] Global pass over optimizing includes (#3862) --- .../ext/launcher/src/backgroundimage.cpp | 1 - .../ext/launcher/src/launcherwindow.cpp | 20 ++- .../ext/launcher/src/notificationwindow.cpp | 2 - .../ext/launcher/src/profile/actiondialog.cpp | 6 +- .../src/profile/additionalscriptsdialog.cpp | 7 +- .../ext/launcher/src/profile/assetedit.cpp | 7 - .../ext/launcher/src/profile/assetsdialog.cpp | 2 +- .../launcher/src/profile/assettreemodel.cpp | 4 +- .../ext/launcher/src/profile/cameradialog.cpp | 6 - .../launcher/src/profile/deltatimesdialog.cpp | 14 +- .../launcher/src/profile/horizonsdialog.cpp | 9 +- .../launcher/src/profile/marknodesdialog.cpp | 7 +- .../ext/launcher/src/profile/metadialog.cpp | 4 +- .../launcher/src/profile/modulesdialog.cpp | 2 - .../ext/launcher/src/profile/profileedit.cpp | 5 +- .../launcher/src/profile/propertiesdialog.cpp | 6 - .../launcher/src/profile/scriptlogdialog.cpp | 12 +- .../ext/launcher/src/profile/timedialog.cpp | 6 +- .../ext/launcher/src/settingsdialog.cpp | 3 - .../src/sgctedit/displaywindowunion.cpp | 7 +- .../ext/launcher/src/sgctedit/monitorbox.cpp | 1 - .../ext/launcher/src/sgctedit/sgctedit.cpp | 3 - .../launcher/src/sgctedit/windowcontrol.cpp | 5 +- .../ext/launcher/src/splitcombobox.cpp | 2 - .../ext/launcher/src/windowcolors.cpp | 1 + apps/OpenSpace/ext/sgct | 2 +- ext/ghoul | 2 +- include/openspace/camera/camera.h | 2 +- include/openspace/data/dataloader.h | 2 - include/openspace/data/datamapping.h | 6 +- .../documentation/documentationengine.h | 3 +- include/openspace/engine/downloadmanager.h | 2 +- include/openspace/engine/moduleengine.inl | 16 +- include/openspace/engine/openspaceengine.h | 1 - include/openspace/engine/syncengine.h | 1 - include/openspace/events/event.h | 20 +-- .../interaction/camerainteractionstates.h | 4 +- .../interaction/joystickcamerastates.h | 1 - .../interaction/joystickinputstate.h | 3 - .../interaction/scriptcamerastates.h | 2 + .../interaction/websocketcamerastates.h | 1 - .../interaction/websocketinputstate.h | 2 - include/openspace/mission/missionmanager.h | 2 - .../openspace/navigation/navigationhandler.h | 3 - .../openspace/navigation/navigationstate.h | 4 +- .../openspace/navigation/orbitalnavigator.h | 1 - include/openspace/navigation/path.h | 4 +- .../pathcurves/avoidcollisioncurve.h | 2 + include/openspace/navigation/pathnavigator.h | 1 - .../openspace/network/parallelconnection.h | 2 +- include/openspace/network/parallelpeer.h | 1 - .../properties/list/stringlistproperty.h | 2 + .../openspace/properties/misc/listproperty.h | 1 + .../properties/misc/selectionproperty.h | 1 + .../openspace/rendering/framebufferrenderer.h | 2 - include/openspace/rendering/loadingscreen.h | 3 - include/openspace/rendering/luaconsole.h | 2 - include/openspace/rendering/renderable.h | 2 - include/openspace/rendering/renderengine.h | 16 +- .../rendering/screenspacerenderable.h | 1 - .../rendering/screenspacerenderabletext.h | 13 +- .../openspace/rendering/texturecomponent.h | 2 +- .../openspace/rendering/transferfunction.h | 2 - include/openspace/rendering/volumeraycaster.h | 2 - include/openspace/scene/profile.h | 1 - include/openspace/scene/scene.h | 1 - include/openspace/scene/scenegraphnode.h | 3 +- include/openspace/scene/timeframe.h | 1 - include/openspace/scripting/scriptengine.h | 1 - include/openspace/util/collisionhelper.h | 2 +- include/openspace/util/concurrentjobmanager.h | 4 +- .../openspace/util/concurrentjobmanager.inl | 10 +- include/openspace/util/concurrentqueue.inl | 1 - include/openspace/util/distanceconversion.h | 1 - .../util/dynamicfilesequencedownloader.h | 4 - include/openspace/util/ellipsoid.h | 1 - include/openspace/util/factorymanager.inl | 1 - include/openspace/util/job.h | 2 - include/openspace/util/json_helper.h | 3 +- include/openspace/util/json_helper.inl | 1 - include/openspace/util/keys.h | 3 +- include/openspace/util/planegeometry.h | 4 +- include/openspace/util/sphere.h | 2 +- include/openspace/util/spicemanager.h | 1 - include/openspace/util/syncbuffer.h | 1 - include/openspace/util/syncbuffer.inl | 1 - include/openspace/util/syncdata.h | 2 +- include/openspace/util/syncdata.inl | 20 +-- include/openspace/util/threadpool.h | 2 +- include/openspace/util/timeconversion.h | 1 - include/openspace/util/timeline.h | 2 - include/openspace/util/timeline.inl | 2 + include/openspace/util/touch.h | 1 - .../rendering/renderablefieldlinessequence.h | 1 + .../fitsfilereader/include/fitsfilereader.h | 16 +- .../include/renderabletimevaryingfitssphere.h | 1 + .../fitsfilereader/include/wsafitshelper.h | 4 +- modules/fitsfilereader/src/fitsfilereader.cpp | 6 +- modules/fitsfilereader/src/wsafitshelper.cpp | 4 +- modules/globebrowsing/src/lrucache.inl | 30 ++-- modules/globebrowsing/src/lruthreadpool.h | 6 +- modules/globebrowsing/src/lruthreadpool.inl | 20 +-- .../src/prioritizingconcurrentjobmanager.h | 2 +- .../rendering/renderablemultiresvolume.cpp | 1 + modules/server/include/serverinterface.h | 3 +- modules/server/src/serverinterface.cpp | 1 - modules/volume/lrucache.h | 4 +- modules/volume/lrucache.inl | 34 ++-- modules/volume/rawvolume.inl | 2 +- src/camera/camera.cpp | 1 - src/data/csvloader.cpp | 1 + src/data/dataloader.cpp | 2 - src/data/speckloader.cpp | 5 - src/documentation/documentation.cpp | 4 +- src/documentation/documentationengine.cpp | 170 +++++++++--------- src/engine/configuration.cpp | 17 +- src/engine/downloadmanager.cpp | 10 +- src/engine/globals.cpp | 3 - src/engine/logfactory.cpp | 2 - src/engine/moduleengine.cpp | 2 - src/engine/moduleengine_lua.inl | 6 +- src/engine/openspaceengine.cpp | 6 - src/engine/openspaceengine_lua.inl | 23 ++- src/engine/settings.cpp | 5 +- src/engine/syncengine.cpp | 2 +- src/events/event.cpp | 52 +++--- src/interaction/actionmanager_lua.inl | 25 +-- src/interaction/interactionmonitor.cpp | 1 - src/interaction/joystickcamerastates.cpp | 1 - src/interaction/joystickinputstate.cpp | 2 - src/interaction/keybindingmanager.cpp | 4 - src/interaction/websocketcamerastates.cpp | 6 +- src/interaction/websocketinputstate.cpp | 3 - src/mission/mission.cpp | 3 +- src/mission/missionmanager.cpp | 4 - src/navigation/keyframenavigator.cpp | 3 - src/navigation/navigationhandler.cpp | 4 - src/navigation/navigationhandler_lua.inl | 1 - src/navigation/navigationstate.cpp | 3 +- src/navigation/orbitalnavigator.cpp | 4 +- src/navigation/orbitalnavigator_lua.inl | 10 +- src/navigation/path.cpp | 3 - src/navigation/pathcurve.cpp | 4 - .../pathcurves/avoidcollisioncurve.cpp | 3 - .../pathcurves/zoomoutoverviewcurve.cpp | 3 - src/navigation/pathnavigator.cpp | 8 - src/navigation/waypoint.cpp | 1 - src/network/parallelconnection.cpp | 2 - src/properties/list/doublelistproperty.cpp | 3 - src/properties/list/intlistproperty.cpp | 3 - src/properties/list/stringlistproperty.cpp | 3 - src/properties/matrix/dmat2property.cpp | 3 +- src/properties/matrix/dmat3property.cpp | 3 +- src/properties/matrix/dmat4property.cpp | 3 +- src/properties/matrix/mat2property.cpp | 3 +- src/properties/matrix/mat3property.cpp | 3 +- src/properties/matrix/mat4property.cpp | 3 +- src/properties/misc/selectionproperty.cpp | 2 - src/properties/property.cpp | 2 - src/properties/propertyowner.cpp | 1 - src/properties/scalar/doubleproperty.cpp | 4 +- src/properties/scalar/floatproperty.cpp | 4 +- src/properties/scalar/intproperty.cpp | 4 +- src/properties/scalar/longproperty.cpp | 4 +- src/properties/scalar/shortproperty.cpp | 4 +- src/properties/scalar/uintproperty.cpp | 4 +- src/properties/scalar/ulongproperty.cpp | 4 +- src/properties/scalar/ushortproperty.cpp | 4 +- src/properties/vector/dvec2property.cpp | 3 +- src/properties/vector/dvec3property.cpp | 3 +- src/properties/vector/dvec4property.cpp | 3 +- src/properties/vector/ivec2property.cpp | 3 +- src/properties/vector/ivec3property.cpp | 3 +- src/properties/vector/ivec4property.cpp | 3 +- src/properties/vector/uvec2property.cpp | 3 +- src/properties/vector/uvec3property.cpp | 3 +- src/properties/vector/uvec4property.cpp | 3 +- src/properties/vector/vec2property.cpp | 3 +- src/properties/vector/vec3property.cpp | 3 +- src/properties/vector/vec4property.cpp | 3 +- src/rendering/colormappingcomponent.cpp | 2 - src/rendering/dashboard.cpp | 3 +- src/rendering/dashboarditem.cpp | 2 - src/rendering/dashboardtextitem.cpp | 1 - src/rendering/deferredcastermanager.cpp | 1 - src/rendering/fadeable.cpp | 4 - src/rendering/framebufferrenderer.cpp | 2 - src/rendering/helper.cpp | 3 +- src/rendering/loadingscreen.cpp | 3 - src/rendering/luaconsole.cpp | 1 - src/rendering/raycastermanager.cpp | 1 - src/rendering/renderable.cpp | 1 - src/rendering/renderengine.cpp | 9 - src/rendering/renderengine_lua.inl | 14 +- .../screenspacerenderableframebuffer.cpp | 3 - src/rendering/texturecomponent.cpp | 1 - src/rendering/transferfunction.cpp | 3 +- src/scene/asset.cpp | 3 - src/scene/assetmanager.cpp | 2 +- src/scene/assetmanager_lua.inl | 3 + src/scene/profile.cpp | 5 - src/scene/rotation.cpp | 2 - src/scene/scale.cpp | 2 - src/scene/scene_lua.inl | 1 - src/scene/timeframe.cpp | 4 - src/scene/translation.cpp | 2 - src/scripting/scriptengine.cpp | 3 - src/scripting/scriptscheduler.cpp | 1 - src/scripting/scriptscheduler_lua.inl | 12 +- src/scripting/systemcapabilitiesbinding.cpp | 5 - .../systemcapabilitiesbinding_lua.inl | 4 + src/util/boxgeometry.cpp | 2 - src/util/collisionhelper.cpp | 2 - src/util/coordinateconversion.cpp | 1 - src/util/distanceconversion.cpp | 2 - src/util/dynamicfilesequencedownloader.cpp | 4 +- src/util/factorymanager.cpp | 1 - src/util/geodetic.cpp | 1 - src/util/httprequest.cpp | 2 - src/util/json_helper.cpp | 2 +- src/util/keys.cpp | 1 - src/util/openspacemodule.cpp | 1 - src/util/planegeometry.cpp | 6 +- src/util/spicemanager.cpp | 5 - src/util/spicemanager_lua.inl | 1 + src/util/syncbuffer.cpp | 1 - src/util/taskloader.cpp | 2 - src/util/time.cpp | 11 +- src/util/time_lua.inl | 3 +- src/util/timeconversion.cpp | 4 - src/util/timemanager.cpp | 1 - src/util/timerange.cpp | 1 - support/coding/codegen | 2 +- tests/test_profile.cpp | 6 +- 234 files changed, 459 insertions(+), 710 deletions(-) diff --git a/apps/OpenSpace/ext/launcher/src/backgroundimage.cpp b/apps/OpenSpace/ext/launcher/src/backgroundimage.cpp index c9582e7d25..91868b8fbe 100644 --- a/apps/OpenSpace/ext/launcher/src/backgroundimage.cpp +++ b/apps/OpenSpace/ext/launcher/src/backgroundimage.cpp @@ -26,7 +26,6 @@ #include #include -#include #include BackgroundImage::BackgroundImage(QRect size, const std::filesystem::path& syncFolder, diff --git a/apps/OpenSpace/ext/launcher/src/launcherwindow.cpp b/apps/OpenSpace/ext/launcher/src/launcherwindow.cpp index 9522db71bc..b6ca263267 100644 --- a/apps/OpenSpace/ext/launcher/src/launcherwindow.cpp +++ b/apps/OpenSpace/ext/launcher/src/launcherwindow.cpp @@ -31,17 +31,14 @@ #include "splitcombobox.h" #include #include -#include +#include #include #include #include -#include #include #include #include -#include #include -#include #include using namespace openspace; @@ -148,9 +145,18 @@ LauncherWindow::LauncherWindow(bool profileEnabled, const Configuration& globalC { QFile file(":/qss/launcher.qss"); - file.open(QFile::ReadOnly); - const QString styleSheet = QLatin1String(file.readAll()); - setStyleSheet(styleSheet); + const bool success = file.open(QFile::ReadOnly); + if (!success) { + QMessageBox::critical( + this, + "Missing QSS", + "Could not find launcher.qss" + ); + } + else { + const QString styleSheet = QLatin1String(file.readAll()); + setStyleSheet(styleSheet); + } } QWidget* centralWidget = new QWidget; diff --git a/apps/OpenSpace/ext/launcher/src/notificationwindow.cpp b/apps/OpenSpace/ext/launcher/src/notificationwindow.cpp index b154cf8d75..a50dd9ffd9 100644 --- a/apps/OpenSpace/ext/launcher/src/notificationwindow.cpp +++ b/apps/OpenSpace/ext/launcher/src/notificationwindow.cpp @@ -31,11 +31,9 @@ #include #include #include -#include #include #include #include -#include #include using namespace openspace; diff --git a/apps/OpenSpace/ext/launcher/src/profile/actiondialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/actiondialog.cpp index a1ba99e755..c4174d2794 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/actiondialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/actiondialog.cpp @@ -27,21 +27,19 @@ #include "profile/line.h" #include "profile/scriptlogdialog.h" #include -#include #include #include #include #include #include #include -#include #include #include -#include +#include #include #include #include -#include +#include using namespace openspace; diff --git a/apps/OpenSpace/ext/launcher/src/profile/additionalscriptsdialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/additionalscriptsdialog.cpp index 245b2f8ec3..8cfcb05c9a 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/additionalscriptsdialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/additionalscriptsdialog.cpp @@ -26,15 +26,18 @@ #include "profile/line.h" #include "profile/scriptlogdialog.h" -#include #include #include #include #include #include #include -#include +#include +#include #include +#include +#include +#include AdditionalScriptsDialog::AdditionalScriptsDialog(QWidget* parent, std::vector* scripts) diff --git a/apps/OpenSpace/ext/launcher/src/profile/assetedit.cpp b/apps/OpenSpace/ext/launcher/src/profile/assetedit.cpp index 0ea4ab91bf..c5922e0b5d 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/assetedit.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/assetedit.cpp @@ -26,17 +26,10 @@ #include "profile/horizonsdialog.h" #include "profile/line.h" -#include -#include #include -#include #include -#include #include #include -#include -#include -#include AssetEdit::AssetEdit(QWidget* parent) : QDialog(parent) diff --git a/apps/OpenSpace/ext/launcher/src/profile/assetsdialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/assetsdialog.cpp index 1481d7cce5..b11ca492fc 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/assetsdialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/assetsdialog.cpp @@ -27,7 +27,6 @@ #include "profile/assetedit.h" #include "profile/line.h" #include -#include #include #include #include @@ -35,6 +34,7 @@ #include #include #include +#include namespace { bool traverseToExpandSelectedItems(QTreeView& tree, AssetTreeModel& model, int rows, diff --git a/apps/OpenSpace/ext/launcher/src/profile/assettreemodel.cpp b/apps/OpenSpace/ext/launcher/src/profile/assettreemodel.cpp index f025897a14..9eab2845e0 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/assettreemodel.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/assettreemodel.cpp @@ -22,12 +22,12 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include "profile/assettreeitem.h" #include "profile/assettreemodel.h" + +#include "profile/assettreeitem.h" #include "filesystemaccess.h" #include #include -#include namespace { constexpr std::string_view Header1 = "Asset"; diff --git a/apps/OpenSpace/ext/launcher/src/profile/cameradialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/cameradialog.cpp index fdc0e9baa8..1b6930c151 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/cameradialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/cameradialog.cpp @@ -27,17 +27,11 @@ #include "profile/line.h" #include #include -#include #include -#include #include -#include #include -#include #include -#include #include -#include #include namespace { diff --git a/apps/OpenSpace/ext/launcher/src/profile/deltatimesdialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/deltatimesdialog.cpp index 79f5b47bfa..b901ed4032 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/deltatimesdialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/deltatimesdialog.cpp @@ -25,22 +25,24 @@ #include "profile/deltatimesdialog.h" #include "profile/line.h" -#include -#include #include #include -#include -#include #include #include #include -#include #include #include #include -#include #include +#include +#include +#include #include +#include +#include +#include +#include +#include namespace { constexpr int MaxNumberOfKeys = 30; diff --git a/apps/OpenSpace/ext/launcher/src/profile/horizonsdialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/horizonsdialog.cpp index ac71422aea..0d2d7bcf24 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/horizonsdialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/horizonsdialog.cpp @@ -26,9 +26,7 @@ #include "profile/line.h" #include -#include #include -#include #include #include #include @@ -36,7 +34,6 @@ #include #include #include -#include #include #include #include @@ -44,12 +41,10 @@ #include #include #include -#include +#include +#include #include -//using json = nlohmann::json; -//using namespace openspace; - namespace { constexpr std::string_view _loggerCat = "HorizonsDialog"; diff --git a/apps/OpenSpace/ext/launcher/src/profile/marknodesdialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/marknodesdialog.cpp index bb1a664e18..b6310dddb7 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/marknodesdialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/marknodesdialog.cpp @@ -25,15 +25,16 @@ #include "profile/marknodesdialog.h" #include "profile/line.h" -#include #include -#include #include #include -#include #include #include #include +#include +#include +#include +#include MarkNodesDialog::MarkNodesDialog(QWidget* parent, std::vector* markedNodes) : QDialog(parent) diff --git a/apps/OpenSpace/ext/launcher/src/profile/metadialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/metadialog.cpp index 4fd0342c1f..c1d60ca3e8 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/metadialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/metadialog.cpp @@ -27,12 +27,10 @@ #include "profile/line.h" #include #include -#include #include -#include #include #include -#include +#include MetaDialog::MetaDialog(QWidget* parent, std::optional* meta) : QDialog(parent) diff --git a/apps/OpenSpace/ext/launcher/src/profile/modulesdialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/modulesdialog.cpp index d59b23d032..1b7588b5e3 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/modulesdialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/modulesdialog.cpp @@ -26,11 +26,9 @@ #include "profile/line.h" #include -#include #include #include #include -#include #include #include #include diff --git a/apps/OpenSpace/ext/launcher/src/profile/profileedit.cpp b/apps/OpenSpace/ext/launcher/src/profile/profileedit.cpp index 1b562035f6..ce3ec6f5d4 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/profileedit.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/profileedit.cpp @@ -37,20 +37,19 @@ #include "profile/timedialog.h" #include "profile/uipanelsdialog.h" #include -#include #include #include #include #include -#include #include #include #include #include #include +#include #include #include -#include +#include #ifdef WIN32 #include diff --git a/apps/OpenSpace/ext/launcher/src/profile/propertiesdialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/propertiesdialog.cpp index 168953a12a..4602f71e38 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/propertiesdialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/propertiesdialog.cpp @@ -26,20 +26,14 @@ #include "profile/line.h" #include "profile/scriptlogdialog.h" -#include #include #include -#include -#include #include #include -#include #include #include #include -#include #include -#include using namespace openspace; diff --git a/apps/OpenSpace/ext/launcher/src/profile/scriptlogdialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/scriptlogdialog.cpp index 7a88ce9c57..dd318b90c8 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/scriptlogdialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/scriptlogdialog.cpp @@ -27,19 +27,21 @@ #include "profile/line.h" #include #include -#include #include -#include #include #include #include #include -#include #include -#include #include -#include #include +#include +#include +#include +#include +#include +#include +#include ScriptLogDialog::ScriptLogDialog(QWidget* parent, std::string filter) : QDialog(parent) diff --git a/apps/OpenSpace/ext/launcher/src/profile/timedialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/timedialog.cpp index a1c86a2f7b..d7bde8ec34 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/timedialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/timedialog.cpp @@ -26,16 +26,12 @@ #include "profile/line.h" #include -#include #include #include -#include #include -#include -#include #include #include -#include +#include using namespace openspace; diff --git a/apps/OpenSpace/ext/launcher/src/settingsdialog.cpp b/apps/OpenSpace/ext/launcher/src/settingsdialog.cpp index 5e943f99c3..11508a9004 100644 --- a/apps/OpenSpace/ext/launcher/src/settingsdialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/settingsdialog.cpp @@ -25,14 +25,11 @@ #include "settingsdialog.h" #include "profile/line.h" - #include #include #include #include #include -#include -#include #include SettingsDialog::SettingsDialog(openspace::Settings settings, QWidget* parent) diff --git a/apps/OpenSpace/ext/launcher/src/sgctedit/displaywindowunion.cpp b/apps/OpenSpace/ext/launcher/src/sgctedit/displaywindowunion.cpp index 87da6cdc2a..92d26a3018 100644 --- a/apps/OpenSpace/ext/launcher/src/sgctedit/displaywindowunion.cpp +++ b/apps/OpenSpace/ext/launcher/src/sgctedit/displaywindowunion.cpp @@ -25,14 +25,11 @@ #include "sgctedit/displaywindowunion.h" #include "sgctedit/windowcontrol.h" -#include #include -#include -#include #include #include -#include -#include +#include +#include namespace { template struct overloaded : Ts... { using Ts::operator()...; }; diff --git a/apps/OpenSpace/ext/launcher/src/sgctedit/monitorbox.cpp b/apps/OpenSpace/ext/launcher/src/sgctedit/monitorbox.cpp index 95eb18c98a..930c83dc0a 100644 --- a/apps/OpenSpace/ext/launcher/src/sgctedit/monitorbox.cpp +++ b/apps/OpenSpace/ext/launcher/src/sgctedit/monitorbox.cpp @@ -24,7 +24,6 @@ #include "sgctedit/monitorbox.h" -#include #include "windowcolors.h" #include diff --git a/apps/OpenSpace/ext/launcher/src/sgctedit/sgctedit.cpp b/apps/OpenSpace/ext/launcher/src/sgctedit/sgctedit.cpp index 733dc087b6..5e7e65dfe8 100644 --- a/apps/OpenSpace/ext/launcher/src/sgctedit/sgctedit.cpp +++ b/apps/OpenSpace/ext/launcher/src/sgctedit/sgctedit.cpp @@ -26,13 +26,10 @@ #include #include -#include #include #include #include #include -#include -#include #include #include #include diff --git a/apps/OpenSpace/ext/launcher/src/sgctedit/windowcontrol.cpp b/apps/OpenSpace/ext/launcher/src/sgctedit/windowcontrol.cpp index deddf743ef..f671b2326a 100644 --- a/apps/OpenSpace/ext/launcher/src/sgctedit/windowcontrol.cpp +++ b/apps/OpenSpace/ext/launcher/src/sgctedit/windowcontrol.cpp @@ -24,19 +24,18 @@ #include "sgctedit/windowcontrol.h" -#include #include -#include "sgctedit/displaywindowunion.h" #include "windowcolors.h" #include #include #include #include #include -#include #include #include +#include #include +#include namespace { std::array, 10> Quality = { diff --git a/apps/OpenSpace/ext/launcher/src/splitcombobox.cpp b/apps/OpenSpace/ext/launcher/src/splitcombobox.cpp index c97e2b2f36..d34f6865ca 100644 --- a/apps/OpenSpace/ext/launcher/src/splitcombobox.cpp +++ b/apps/OpenSpace/ext/launcher/src/splitcombobox.cpp @@ -26,8 +26,6 @@ #include "usericon.h" #include -#include -#include #include SplitComboBox::SplitComboBox(QWidget* parent, std::filesystem::path userPath, diff --git a/apps/OpenSpace/ext/launcher/src/windowcolors.cpp b/apps/OpenSpace/ext/launcher/src/windowcolors.cpp index 7bedcbb6b1..aa05f1a384 100644 --- a/apps/OpenSpace/ext/launcher/src/windowcolors.cpp +++ b/apps/OpenSpace/ext/launcher/src/windowcolors.cpp @@ -25,6 +25,7 @@ #include "windowcolors.h" #include +#include QColor colorForWindow(int idx) { constexpr std::array Hardcoded = { diff --git a/apps/OpenSpace/ext/sgct b/apps/OpenSpace/ext/sgct index 98be6301fb..c3ae514b21 160000 --- a/apps/OpenSpace/ext/sgct +++ b/apps/OpenSpace/ext/sgct @@ -1 +1 @@ -Subproject commit 98be6301fb8884f4c3906c52e67d2786593f6da6 +Subproject commit c3ae514b21e97e74c7dc36597a3ac65a785cc987 diff --git a/ext/ghoul b/ext/ghoul index b274675f3d..50315734cb 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit b274675f3de2cffeef995def4247e5d0fbf50693 +Subproject commit 50315734cb1f3f5bd2fbfb60d599bccdfc2e8262 diff --git a/include/openspace/camera/camera.h b/include/openspace/camera/camera.h index 298391f336..bb1424d488 100644 --- a/include/openspace/camera/camera.h +++ b/include/openspace/camera/camera.h @@ -56,7 +56,7 @@ public: * Used to explicitly show which variables within the Camera class that are used * for caching. */ - template + template struct Cached { T datum = T(0); bool isDirty = true; diff --git a/include/openspace/data/dataloader.h b/include/openspace/data/dataloader.h index c0f22cc7de..0e9a173454 100644 --- a/include/openspace/data/dataloader.h +++ b/include/openspace/data/dataloader.h @@ -27,8 +27,6 @@ #include #include -#include -#include #include #include #include diff --git a/include/openspace/data/datamapping.h b/include/openspace/data/datamapping.h index 5554c630d9..da203e690d 100644 --- a/include/openspace/data/datamapping.h +++ b/include/openspace/data/datamapping.h @@ -29,8 +29,8 @@ #include #include -namespace openspace::documentation { struct Documentation; } namespace ghoul { class Dictionary; } +namespace openspace::documentation { struct Documentation; } namespace openspace::dataloader { @@ -62,8 +62,8 @@ struct DataMapping { }; /** - * Generate a string based on the data mapping, that can be used to uniquely - * identify the dataset. + * Generate a string based on the data mapping, that can be used to uniquely identify the + * dataset. */ std::string generateHashString(const DataMapping& dm); diff --git a/include/openspace/documentation/documentationengine.h b/include/openspace/documentation/documentationengine.h index 4b8c08e1bc..25690c4778 100644 --- a/include/openspace/documentation/documentationengine.h +++ b/include/openspace/documentation/documentationengine.h @@ -28,13 +28,12 @@ #include #include #include -#include namespace openspace::documentation { /** * The DocumentationEngine has the ability to collect all Documentation%s that are - * produced in the application an write them out as a documentation file for human + * produced in the application and write them out as a documentation file for human * consumption. */ class DocumentationEngine { diff --git a/include/openspace/engine/downloadmanager.h b/include/openspace/engine/downloadmanager.h index 5f49f0a07d..54519e4c71 100644 --- a/include/openspace/engine/downloadmanager.h +++ b/include/openspace/engine/downloadmanager.h @@ -84,7 +84,7 @@ public: // Just a helper function to check if a future is ready to ".get()". Not specific // to DownloadManager but is useful for anyone using the DownloadManager - template + template static bool futureReady(std::future const& f) { return f.wait_for(std::chrono::seconds(0)) == std::future_status::ready; } diff --git a/include/openspace/engine/moduleengine.inl b/include/openspace/engine/moduleengine.inl index c53d2105af..ca8cc74deb 100644 --- a/include/openspace/engine/moduleengine.inl +++ b/include/openspace/engine/moduleengine.inl @@ -30,16 +30,14 @@ namespace openspace { template ModuleSubClass* ModuleEngine::module() const { - const auto it = std::find_if(_modules.begin(), _modules.end(), + const auto it = std::find_if( + _modules.begin(), + _modules.end(), [](const std::unique_ptr& m) { - return m->identifier() == ModuleSubClass::Name; - }); - if (it != _modules.end()) { - return dynamic_cast(it->get()); - } - else { - return nullptr; - } + return m->identifier() == ModuleSubClass::Name; + } + ); + return it != _modules.end() ? dynamic_cast(it->get()) : nullptr; } } // namespace openspace diff --git a/include/openspace/engine/openspaceengine.h b/include/openspace/engine/openspaceengine.h index 597d09f295..a9cc5400e4 100644 --- a/include/openspace/engine/openspaceengine.h +++ b/include/openspace/engine/openspaceengine.h @@ -27,7 +27,6 @@ #include #include -#include #include #include #include diff --git a/include/openspace/engine/syncengine.h b/include/openspace/engine/syncengine.h index d26907f22e..3da9fbea23 100644 --- a/include/openspace/engine/syncengine.h +++ b/include/openspace/engine/syncengine.h @@ -28,7 +28,6 @@ #include #include -#include #include namespace openspace { diff --git a/include/openspace/events/event.h b/include/openspace/events/event.h index 012bb29936..02a1eea501 100644 --- a/include/openspace/events/event.h +++ b/include/openspace/events/event.h @@ -30,15 +30,15 @@ #include namespace openspace { - namespace properties { class Property; } +namespace properties { class Property; } - class Camera; - class Layer; - class Profile; - class Renderable; - class SceneGraphNode; - class ScreenSpaceRenderable; - class Time; +class Camera; +class Layer; +class Profile; +class Renderable; +class SceneGraphNode; +class ScreenSpaceRenderable; +class Time; } // namespace openspace namespace openspace::events { @@ -171,8 +171,8 @@ struct EventAssetLoading : public Event { * Creates an instance of an AssetLoading event. * * \param assetPath_ The path to the asset - * \param state_ The new state of the asset given by 'asstPath_'; is one of `Loading`, - * `Loaded`, `Unloaded`, or `Error` + * \param newState The new state of the asset given by 'asstPath_'; is one of + `Loading`, `Loaded`, `Unloaded`, or `Error` */ EventAssetLoading(const std::filesystem::path& assetPath_, State newState); diff --git a/include/openspace/interaction/camerainteractionstates.h b/include/openspace/interaction/camerainteractionstates.h index edd300a4dc..4a4dc2c744 100644 --- a/include/openspace/interaction/camerainteractionstates.h +++ b/include/openspace/interaction/camerainteractionstates.h @@ -55,7 +55,7 @@ public: void resetVelocities(); /** - * Returns true if any of the velocities are larger than zero, i.e. wether an + * Returns true if any of the velocities are larger than zero, i.e. whether an * interaction happened. */ bool hasNonZeroVelocities(bool checkOnlyMovement = false) const; @@ -63,7 +63,7 @@ public: protected: template struct InteractionState { - InteractionState(double scaleFactor); + explicit InteractionState(double scaleFactor); void setFriction(double friction); void setVelocityScaleFactor(double scaleFactor); diff --git a/include/openspace/interaction/joystickcamerastates.h b/include/openspace/interaction/joystickcamerastates.h index edd4e86bc3..f2c0adaa73 100644 --- a/include/openspace/interaction/joystickcamerastates.h +++ b/include/openspace/interaction/joystickcamerastates.h @@ -29,7 +29,6 @@ #include #include -#include #include #include diff --git a/include/openspace/interaction/joystickinputstate.h b/include/openspace/interaction/joystickinputstate.h index 12b81e1ee4..eee1e65bd0 100644 --- a/include/openspace/interaction/joystickinputstate.h +++ b/include/openspace/interaction/joystickinputstate.h @@ -25,12 +25,9 @@ #ifndef __OPENSPACE_CORE___JOYSTICKINPUTSTATE___H__ #define __OPENSPACE_CORE___JOYSTICKINPUTSTATE___H__ -#include #include #include -#include #include -#include #include namespace openspace::interaction { diff --git a/include/openspace/interaction/scriptcamerastates.h b/include/openspace/interaction/scriptcamerastates.h index f9617f5cc3..342f736d87 100644 --- a/include/openspace/interaction/scriptcamerastates.h +++ b/include/openspace/interaction/scriptcamerastates.h @@ -27,6 +27,8 @@ #include +#include + namespace openspace::interaction { class ScriptCameraStates : public CameraInteractionStates { diff --git a/include/openspace/interaction/websocketcamerastates.h b/include/openspace/interaction/websocketcamerastates.h index 2fc50547bf..3e5c80ce92 100644 --- a/include/openspace/interaction/websocketcamerastates.h +++ b/include/openspace/interaction/websocketcamerastates.h @@ -29,7 +29,6 @@ #include #include -#include #include #include diff --git a/include/openspace/interaction/websocketinputstate.h b/include/openspace/interaction/websocketinputstate.h index 593fb22394..1251948ba4 100644 --- a/include/openspace/interaction/websocketinputstate.h +++ b/include/openspace/interaction/websocketinputstate.h @@ -27,9 +27,7 @@ #include #include -#include #include -#include #include #include diff --git a/include/openspace/mission/missionmanager.h b/include/openspace/mission/missionmanager.h index 50bd573e47..b6200d67ac 100644 --- a/include/openspace/mission/missionmanager.h +++ b/include/openspace/mission/missionmanager.h @@ -27,8 +27,6 @@ #include -#include -#include #include #include diff --git a/include/openspace/navigation/navigationhandler.h b/include/openspace/navigation/navigationhandler.h index 9e4b598cd5..053f6526b4 100644 --- a/include/openspace/navigation/navigationhandler.h +++ b/include/openspace/navigation/navigationhandler.h @@ -51,10 +51,7 @@ namespace openspace::scripting { struct LuaLibrary; } namespace openspace::interaction { struct JoystickInputStates; -class KeyframeNavigator; struct NavigationState; -class OrbitalNavigator; -class PathNavigator; struct NodeCameraStateSpec; struct WebsocketInputStates; diff --git a/include/openspace/navigation/navigationstate.h b/include/openspace/navigation/navigationstate.h index ced0f6dd3b..fec5b79d04 100644 --- a/include/openspace/navigation/navigationstate.h +++ b/include/openspace/navigation/navigationstate.h @@ -29,9 +29,7 @@ #include #include -namespace openspace { - struct CameraPose; -} // namespace openspace +namespace openspace { struct CameraPose; } namespace openspace::interaction { diff --git a/include/openspace/navigation/orbitalnavigator.h b/include/openspace/navigation/orbitalnavigator.h index f3601b7bc3..37061bbbc3 100644 --- a/include/openspace/navigation/orbitalnavigator.h +++ b/include/openspace/navigation/orbitalnavigator.h @@ -27,7 +27,6 @@ #include -#include #include #include #include diff --git a/include/openspace/navigation/path.h b/include/openspace/navigation/path.h index ffa0661a57..2b3680f677 100644 --- a/include/openspace/navigation/path.h +++ b/include/openspace/navigation/path.h @@ -32,9 +32,7 @@ #include #include -namespace openspace { - struct CameraPose; -} // namespace openspace +namespace openspace { struct CameraPose; } namespace openspace::interaction { diff --git a/include/openspace/navigation/pathcurves/avoidcollisioncurve.h b/include/openspace/navigation/pathcurves/avoidcollisioncurve.h index f42257f2f3..034a6f926c 100644 --- a/include/openspace/navigation/pathcurves/avoidcollisioncurve.h +++ b/include/openspace/navigation/pathcurves/avoidcollisioncurve.h @@ -27,6 +27,8 @@ #include +#include + namespace openspace { class SceneGraphNode; } namespace openspace::interaction { diff --git a/include/openspace/navigation/pathnavigator.h b/include/openspace/navigation/pathnavigator.h index 1cc0633d19..8f157dd7e9 100644 --- a/include/openspace/navigation/pathnavigator.h +++ b/include/openspace/navigation/pathnavigator.h @@ -33,7 +33,6 @@ #include #include #include -#include #include namespace openspace { diff --git a/include/openspace/network/parallelconnection.h b/include/openspace/network/parallelconnection.h index 1eebac617c..59382c3c7a 100644 --- a/include/openspace/network/parallelconnection.h +++ b/include/openspace/network/parallelconnection.h @@ -32,7 +32,7 @@ namespace openspace { -class ParallelConnection { +class ParallelConnection { public: enum class Status : uint32_t { Disconnected = 0, diff --git a/include/openspace/network/parallelpeer.h b/include/openspace/network/parallelpeer.h index a5cbbeab39..f03bf09f6b 100644 --- a/include/openspace/network/parallelpeer.h +++ b/include/openspace/network/parallelpeer.h @@ -27,7 +27,6 @@ #include -#include #include #include #include diff --git a/include/openspace/properties/list/stringlistproperty.h b/include/openspace/properties/list/stringlistproperty.h index ca56b50aea..25eb12e441 100644 --- a/include/openspace/properties/list/stringlistproperty.h +++ b/include/openspace/properties/list/stringlistproperty.h @@ -26,7 +26,9 @@ #define __OPENSPACE_CORE___STRINGLISTPROPERTY___H__ #include + #include +#include namespace openspace::properties { diff --git a/include/openspace/properties/misc/listproperty.h b/include/openspace/properties/misc/listproperty.h index aa70fb3d21..2453549adc 100644 --- a/include/openspace/properties/misc/listproperty.h +++ b/include/openspace/properties/misc/listproperty.h @@ -26,6 +26,7 @@ #define __OPENSPACE_CORE___LISTPROPERTY___H__ #include + #include namespace openspace::properties { diff --git a/include/openspace/properties/misc/selectionproperty.h b/include/openspace/properties/misc/selectionproperty.h index 17c0c24023..8542bb308f 100644 --- a/include/openspace/properties/misc/selectionproperty.h +++ b/include/openspace/properties/misc/selectionproperty.h @@ -28,6 +28,7 @@ #include #include +#include #include namespace openspace::properties { diff --git a/include/openspace/rendering/framebufferrenderer.h b/include/openspace/rendering/framebufferrenderer.h index e71718d978..8447ed381a 100644 --- a/include/openspace/rendering/framebufferrenderer.h +++ b/include/openspace/rendering/framebufferrenderer.h @@ -29,11 +29,9 @@ #include #include -#include #include #include #include -#include #include namespace ghoul { class Dictionary; } diff --git a/include/openspace/rendering/loadingscreen.h b/include/openspace/rendering/loadingscreen.h index cdb7f2f27b..a291b1ef25 100644 --- a/include/openspace/rendering/loadingscreen.h +++ b/include/openspace/rendering/loadingscreen.h @@ -28,9 +28,6 @@ #include #include #include -#include -#include -#include #include #include #include diff --git a/include/openspace/rendering/luaconsole.h b/include/openspace/rendering/luaconsole.h index 03095dc516..f21cf5c72c 100644 --- a/include/openspace/rendering/luaconsole.h +++ b/include/openspace/rendering/luaconsole.h @@ -32,8 +32,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/include/openspace/rendering/renderable.h b/include/openspace/rendering/renderable.h index f434928015..5a91fe8948 100644 --- a/include/openspace/rendering/renderable.h +++ b/include/openspace/rendering/renderable.h @@ -30,8 +30,6 @@ #include #include -#include -#include #include #include #include diff --git a/include/openspace/rendering/renderengine.h b/include/openspace/rendering/renderengine.h index d1e2ceb207..210ea4f002 100644 --- a/include/openspace/rendering/renderengine.h +++ b/include/openspace/rendering/renderengine.h @@ -28,8 +28,6 @@ #include #include -#include -#include #include #include #include @@ -40,14 +38,14 @@ #include namespace ghoul { - namespace fontrendering { class Font; } - namespace opengl { - class ProgramObject; - class OpenGLStateCache; - } // namespace opengl +namespace fontrendering { class Font; } +namespace opengl { + class ProgramObject; + class OpenGLStateCache; +} // namespace opengl - class Dictionary; - class SharedMemory; +class Dictionary; +class SharedMemory; } // ghoul namespace openspace { diff --git a/include/openspace/rendering/screenspacerenderable.h b/include/openspace/rendering/screenspacerenderable.h index 47c7cd4b68..e2bf58921a 100644 --- a/include/openspace/rendering/screenspacerenderable.h +++ b/include/openspace/rendering/screenspacerenderable.h @@ -33,7 +33,6 @@ #include #include #include -#include #include #include diff --git a/include/openspace/rendering/screenspacerenderabletext.h b/include/openspace/rendering/screenspacerenderabletext.h index ed5f10429e..50f8cc339c 100644 --- a/include/openspace/rendering/screenspacerenderabletext.h +++ b/include/openspace/rendering/screenspacerenderabletext.h @@ -31,12 +31,17 @@ #include #include -namespace ghoul { class Dictionary; } -namespace ghoul::opengl { +namespace ghoul { + +class Dictionary; + +namespace fontrendering { class Font; } +namespace opengl { class FramebufferObject; class Texture; -} // namespace ghoul::opengl -namespace ghoul::fontrendering { class Font; } +} // namespace opengl + +} // namespace ghoul namespace openspace { diff --git a/include/openspace/rendering/texturecomponent.h b/include/openspace/rendering/texturecomponent.h index 5b623d8907..88500194c1 100644 --- a/include/openspace/rendering/texturecomponent.h +++ b/include/openspace/rendering/texturecomponent.h @@ -29,7 +29,7 @@ #include namespace ghoul::filesystem { class File; } -namespace ghoul::opengl {class Texture; } +namespace ghoul::opengl { class Texture; } namespace openspace { diff --git a/include/openspace/rendering/transferfunction.h b/include/openspace/rendering/transferfunction.h index 1b0fe415c5..045af80965 100644 --- a/include/openspace/rendering/transferfunction.h +++ b/include/openspace/rendering/transferfunction.h @@ -29,7 +29,6 @@ #include #include #include -#include namespace ghoul::filesystem { class File; } namespace ghoul::opengl { class Texture; } @@ -57,7 +56,6 @@ public: private: void setTextureFromImage(); - void uploadTexture(); std::filesystem::path _filepath; std::unique_ptr _file; diff --git a/include/openspace/rendering/volumeraycaster.h b/include/openspace/rendering/volumeraycaster.h index f9d8809e39..135cf488f3 100644 --- a/include/openspace/rendering/volumeraycaster.h +++ b/include/openspace/rendering/volumeraycaster.h @@ -27,8 +27,6 @@ #include #include -#include -#include namespace ghoul::opengl { class Texture; diff --git a/include/openspace/scene/profile.h b/include/openspace/scene/profile.h index ebf3b2222f..e169c1b23c 100644 --- a/include/openspace/scene/profile.h +++ b/include/openspace/scene/profile.h @@ -25,7 +25,6 @@ #ifndef __OPENSPACE_CORE___PROFILE___H__ #define __OPENSPACE_CORE___PROFILE___H__ -#include #include #include #include diff --git a/include/openspace/scene/scene.h b/include/openspace/scene/scene.h index d0a60a71e0..c319e89b86 100644 --- a/include/openspace/scene/scene.h +++ b/include/openspace/scene/scene.h @@ -29,7 +29,6 @@ #include #include -#include #include #include #include diff --git a/include/openspace/scene/scenegraphnode.h b/include/openspace/scene/scenegraphnode.h index 7f08699654..1be70e9852 100644 --- a/include/openspace/scene/scenegraphnode.h +++ b/include/openspace/scene/scenegraphnode.h @@ -39,11 +39,10 @@ #include #include #include -#include #include #include - //#define Debugging_Core_SceneGraphNode_Indices +// #define Debugging_Core_SceneGraphNode_Indices namespace ghoul { class Dictionary; } namespace ghoul::opengl { class ProgramObject; } diff --git a/include/openspace/scene/timeframe.h b/include/openspace/scene/timeframe.h index 344ee1b428..adcd0ec836 100644 --- a/include/openspace/scene/timeframe.h +++ b/include/openspace/scene/timeframe.h @@ -30,7 +30,6 @@ #include #include #include -#include namespace ghoul { class Dictionary; } diff --git a/include/openspace/scripting/scriptengine.h b/include/openspace/scripting/scriptengine.h index a5e1c7612d..16c8d6642d 100644 --- a/include/openspace/scripting/scriptengine.h +++ b/include/openspace/scripting/scriptengine.h @@ -31,7 +31,6 @@ #include #include #include -#include #include #include diff --git a/include/openspace/util/collisionhelper.h b/include/openspace/util/collisionhelper.h index 5e9eab4082..7cfc662137 100644 --- a/include/openspace/util/collisionhelper.h +++ b/include/openspace/util/collisionhelper.h @@ -50,7 +50,7 @@ bool lineSphereIntersection(const glm::dvec3& p1, const glm::dvec3& p2, /** * Check if the point \p p is inside of the sphere defined by radius \p r and center - * point \p c + * point \p c. */ bool isPointInsideSphere(const glm::dvec3& p, const glm::dvec3& c, double r); diff --git a/include/openspace/util/concurrentjobmanager.h b/include/openspace/util/concurrentjobmanager.h index 46d0a37f9e..91ebf03113 100644 --- a/include/openspace/util/concurrentjobmanager.h +++ b/include/openspace/util/concurrentjobmanager.h @@ -27,7 +27,7 @@ #include #include - +#include #include namespace openspace { @@ -38,7 +38,7 @@ template struct Job; * Templated Concurrent Job Manager * This class is used execute specific jobs on one (1) parallel thread */ -template +template class ConcurrentJobManager { public: explicit ConcurrentJobManager(ThreadPool pool); diff --git a/include/openspace/util/concurrentjobmanager.inl b/include/openspace/util/concurrentjobmanager.inl index 14e5bf1792..d4a69194e5 100644 --- a/include/openspace/util/concurrentjobmanager.inl +++ b/include/openspace/util/concurrentjobmanager.inl @@ -27,12 +27,12 @@ namespace openspace { -template +template ConcurrentJobManager

::ConcurrentJobManager(ThreadPool pool) : threadPool(pool) {} -template +template void ConcurrentJobManager

::enqueueJob(std::shared_ptr> job) { threadPool.enqueue([this, job]() { job->execute(); @@ -41,12 +41,12 @@ void ConcurrentJobManager

::enqueueJob(std::shared_ptr> job) { }); } -template +template void ConcurrentJobManager

::clearEnqueuedJobs() { threadPool.clearTasks(); } -template +template std::shared_ptr> ConcurrentJobManager

::popFinishedJob() { ghoul_assert(!_finishedJobs.empty(), "There is no finished job to pop"); @@ -54,7 +54,7 @@ std::shared_ptr> ConcurrentJobManager

::popFinishedJob() { return _finishedJobs.pop(); } -template +template size_t ConcurrentJobManager

::numFinishedJobs() const { return _finishedJobs.size(); } diff --git a/include/openspace/util/concurrentqueue.inl b/include/openspace/util/concurrentqueue.inl index 043cb3dac6..50a54fafbb 100644 --- a/include/openspace/util/concurrentqueue.inl +++ b/include/openspace/util/concurrentqueue.inl @@ -75,5 +75,4 @@ bool ConcurrentQueue::empty() const { return size() == 0; } - } // namespace openspace diff --git a/include/openspace/util/distanceconversion.h b/include/openspace/util/distanceconversion.h index 7f061896db..063c3f0853 100644 --- a/include/openspace/util/distanceconversion.h +++ b/include/openspace/util/distanceconversion.h @@ -28,7 +28,6 @@ #include #include -#include #include #include #include diff --git a/include/openspace/util/dynamicfilesequencedownloader.h b/include/openspace/util/dynamicfilesequencedownloader.h index 699c5a20d9..a9d13028f2 100644 --- a/include/openspace/util/dynamicfilesequencedownloader.h +++ b/include/openspace/util/dynamicfilesequencedownloader.h @@ -26,13 +26,9 @@ #define __OPENSPACE_CORE___DYNAMICFILESEQUENCEDOWNLOADER___H__ #include -#include #include -#include #include -#include #include -#include #include namespace openspace { diff --git a/include/openspace/util/ellipsoid.h b/include/openspace/util/ellipsoid.h index 5a4dd2e186..5ab77df487 100644 --- a/include/openspace/util/ellipsoid.h +++ b/include/openspace/util/ellipsoid.h @@ -26,7 +26,6 @@ #define __OPENSPACE_CORE___ELLIPSOID___H__ #include - #include namespace openspace { diff --git a/include/openspace/util/factorymanager.inl b/include/openspace/util/factorymanager.inl index 8b093f3519..7c52b7255e 100644 --- a/include/openspace/util/factorymanager.inl +++ b/include/openspace/util/factorymanager.inl @@ -33,7 +33,6 @@ void FactoryManager::addFactory(std::string name) { _factories.push_back({ std::move(f), std::move(name) }); } - template ghoul::TemplateFactory* FactoryManager::factory() const { for (const FactoryInfo& f : _factories) { diff --git a/include/openspace/util/job.h b/include/openspace/util/job.h index 01350aa21c..0cdc8cb96c 100644 --- a/include/openspace/util/job.h +++ b/include/openspace/util/job.h @@ -25,8 +25,6 @@ #ifndef __OPENSPACE_CORE___JOB___H__ #define __OPENSPACE_CORE___JOB___H__ -#include - namespace openspace { /** diff --git a/include/openspace/util/json_helper.h b/include/openspace/util/json_helper.h index 1cc2079bcf..9d64113c8c 100644 --- a/include/openspace/util/json_helper.h +++ b/include/openspace/util/json_helper.h @@ -28,6 +28,7 @@ #include #include #include +#include namespace openspace { @@ -74,7 +75,7 @@ std::string formatJson(T value); * \param json The JSON object to sort * \param key The key the JSON should be sorted by */ -void sortJson(nlohmann::json& json, const std::string& key); +void sortJson(nlohmann::json& json, std::string_view key); /** * Converts the provided JSON object into its corresponding Dictionary format. Please note diff --git a/include/openspace/util/json_helper.inl b/include/openspace/util/json_helper.inl index 86d52a96b6..54f11937e1 100644 --- a/include/openspace/util/json_helper.inl +++ b/include/openspace/util/json_helper.inl @@ -22,7 +22,6 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include #include #include #include diff --git a/include/openspace/util/keys.h b/include/openspace/util/keys.h index b4a626f0cf..27e34ea2bd 100644 --- a/include/openspace/util/keys.h +++ b/include/openspace/util/keys.h @@ -59,9 +59,8 @@ #include #include -#include +#include #include -#include namespace openspace { diff --git a/include/openspace/util/planegeometry.h b/include/openspace/util/planegeometry.h index c3f32f8c2c..6ab6d025c5 100644 --- a/include/openspace/util/planegeometry.h +++ b/include/openspace/util/planegeometry.h @@ -42,10 +42,10 @@ public: void render() const; void updateSize(const glm::vec2& size); - void updateSize(const float size); + void updateSize(float size); private: - void updateGeometry(); + void updateGeometry() const; GLuint _vaoId = 0; GLuint _vBufferId = 0; diff --git a/include/openspace/util/sphere.h b/include/openspace/util/sphere.h index 528ef60595..1caa496ec0 100644 --- a/include/openspace/util/sphere.h +++ b/include/openspace/util/sphere.h @@ -32,7 +32,7 @@ namespace openspace { class Sphere { public: - Sphere(float radius, int segments = 8); + explicit Sphere(float radius, int segments = 8); Sphere(glm::vec3 radius, int segments); Sphere(const Sphere& cpy); ~Sphere(); diff --git a/include/openspace/util/spicemanager.h b/include/openspace/util/spicemanager.h index e7c71f30ef..b66d821120 100644 --- a/include/openspace/util/spicemanager.h +++ b/include/openspace/util/spicemanager.h @@ -27,7 +27,6 @@ #include #include -#include #include #include #include diff --git a/include/openspace/util/syncbuffer.h b/include/openspace/util/syncbuffer.h index a486eefabc..4408cf6781 100644 --- a/include/openspace/util/syncbuffer.h +++ b/include/openspace/util/syncbuffer.h @@ -26,7 +26,6 @@ #define __OPENSPACE_CORE___SYNCBUFFER___H__ #include -#include #include #include diff --git a/include/openspace/util/syncbuffer.inl b/include/openspace/util/syncbuffer.inl index 10fd4c748d..09a18d0099 100644 --- a/include/openspace/util/syncbuffer.inl +++ b/include/openspace/util/syncbuffer.inl @@ -23,7 +23,6 @@ ****************************************************************************************/ #include -#include #include namespace openspace { diff --git a/include/openspace/util/syncdata.h b/include/openspace/util/syncdata.h index 141f28e161..f9bdb0b9e5 100644 --- a/include/openspace/util/syncdata.h +++ b/include/openspace/util/syncdata.h @@ -42,7 +42,7 @@ namespace openspace { * * `((T&) t).method();` */ -template +template class SyncData : public Syncable { public: SyncData() = default; diff --git a/include/openspace/util/syncdata.inl b/include/openspace/util/syncdata.inl index 915150b913..6037f26e09 100644 --- a/include/openspace/util/syncdata.inl +++ b/include/openspace/util/syncdata.inl @@ -26,56 +26,56 @@ namespace openspace { -template +template SyncData::SyncData(const T& val) : _data(val) {} -template +template SyncData::SyncData(const SyncData& o) : _data(o._data) , _doubleBufferedData(o._doubleBufferedData) {} -template +template SyncData& SyncData::operator=(const T& rhs) { _data = rhs; return *this; } -template +template SyncData::operator T&() { return _data; } -template +template SyncData::operator const T&() const { return _data; } -template +template T& SyncData::data() { return _data; } -template +template const T& SyncData::data() const { return _data; } -template +template void SyncData::encode(SyncBuffer* syncBuffer) { _mutex.lock(); syncBuffer->encode(_data); _mutex.unlock(); } -template +template void SyncData::decode(SyncBuffer* syncBuffer) { _mutex.lock(); syncBuffer->decode(_doubleBufferedData); _mutex.unlock(); } -template +template void SyncData::postSync(bool isMaster) { // apply synced update if (!isMaster) { diff --git a/include/openspace/util/threadpool.h b/include/openspace/util/threadpool.h index 8bb74b9e21..89b5a06567 100644 --- a/include/openspace/util/threadpool.h +++ b/include/openspace/util/threadpool.h @@ -26,9 +26,9 @@ #define __OPENSPACE_CORE___THREAD_POOL___H__ #include +#include #include #include -#include #include #include diff --git a/include/openspace/util/timeconversion.h b/include/openspace/util/timeconversion.h index 2fa5b0507b..5b71a3e1a1 100644 --- a/include/openspace/util/timeconversion.h +++ b/include/openspace/util/timeconversion.h @@ -28,7 +28,6 @@ #include #include -#include #include #include #include diff --git a/include/openspace/util/timeline.h b/include/openspace/util/timeline.h index a998153f8c..58bdce1d87 100644 --- a/include/openspace/util/timeline.h +++ b/include/openspace/util/timeline.h @@ -25,9 +25,7 @@ #ifndef __OPENSPACE_CORE___TIMELINE___H__ #define __OPENSPACE_CORE___TIMELINE___H__ -#include #include -#include namespace openspace { diff --git a/include/openspace/util/timeline.inl b/include/openspace/util/timeline.inl index 41fcd558a5..d27942bfac 100644 --- a/include/openspace/util/timeline.inl +++ b/include/openspace/util/timeline.inl @@ -22,6 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ +#include + namespace openspace { template diff --git a/include/openspace/util/touch.h b/include/openspace/util/touch.h index ca3d1ed90f..5ee1a84785 100644 --- a/include/openspace/util/touch.h +++ b/include/openspace/util/touch.h @@ -27,7 +27,6 @@ #include -#include #include namespace openspace { diff --git a/modules/fieldlinessequence/rendering/renderablefieldlinessequence.h b/modules/fieldlinessequence/rendering/renderablefieldlinessequence.h index 36c1a970da..b04d395c1f 100644 --- a/modules/fieldlinessequence/rendering/renderablefieldlinessequence.h +++ b/modules/fieldlinessequence/rendering/renderablefieldlinessequence.h @@ -36,6 +36,7 @@ #include #include #include +#include #include namespace openspace { diff --git a/modules/fitsfilereader/include/fitsfilereader.h b/modules/fitsfilereader/include/fitsfilereader.h index 613bd900ca..4cfd388b64 100644 --- a/modules/fitsfilereader/include/fitsfilereader.h +++ b/modules/fitsfilereader/include/fitsfilereader.h @@ -43,14 +43,14 @@ namespace ghoul::opengl { class Texture; } namespace openspace { -template +template struct ImageData { std::valarray contents; long int width; long int height; }; -template +template struct TableData { std::unordered_map> contents; int readRows; @@ -63,13 +63,13 @@ public: explicit FitsFileReader(bool verboseMode); ~FitsFileReader(); - template + template std::shared_ptr> readImage(const std::filesystem::path& path); - template + template std::shared_ptr> readHeader( std::vector& keywords); - template + template std::shared_ptr readHeaderValue(const std::string key); /** @@ -78,7 +78,7 @@ public: * longer if it's a big file. If no HDU index is given the current Extension HDU will * be read from. */ - template + template std::shared_ptr> readTable(const std::filesystem::path& path, const std::vector& columnNames, int startRow = 1, int endRow = 10, int hduIdx = 1, bool readAll = false); @@ -105,10 +105,10 @@ private: bool _verboseMode; bool isPrimaryHDU(); - template + template std::shared_ptr> readImageInternal(CCfits::PHDU& image); - template + template std::shared_ptr> readImageInternal(CCfits::ExtHDU& image); mutable std::mutex _mutex; diff --git a/modules/fitsfilereader/include/renderabletimevaryingfitssphere.h b/modules/fitsfilereader/include/renderabletimevaryingfitssphere.h index dbe899896a..4aca6a74aa 100644 --- a/modules/fitsfilereader/include/renderabletimevaryingfitssphere.h +++ b/modules/fitsfilereader/include/renderabletimevaryingfitssphere.h @@ -29,6 +29,7 @@ #include #include +#include namespace openspace { diff --git a/modules/fitsfilereader/include/wsafitshelper.h b/modules/fitsfilereader/include/wsafitshelper.h index 6b49cbf379..5e70e350fc 100644 --- a/modules/fitsfilereader/include/wsafitshelper.h +++ b/modules/fitsfilereader/include/wsafitshelper.h @@ -37,7 +37,7 @@ namespace CCfits { namespace openspace { -template +template struct ImageData { std::valarray contents; int width; @@ -67,7 +67,7 @@ void readFitsHeader(const std::filesystem::path& path); */ int nLayers(const std::filesystem::path& path); -template +template std::shared_ptr> readImageInternal(U& image); } // namespace openspace diff --git a/modules/fitsfilereader/src/fitsfilereader.cpp b/modules/fitsfilereader/src/fitsfilereader.cpp index 94657c569d..409cb7a8a9 100644 --- a/modules/fitsfilereader/src/fitsfilereader.cpp +++ b/modules/fitsfilereader/src/fitsfilereader.cpp @@ -138,7 +138,7 @@ std::shared_ptr FitsFileReader::readHeaderValue(const std::string key) { return nullptr; } -template +template std::shared_ptr> FitsFileReader::readTable(const std::filesystem::path& path, const std::vector& columnNames, int startRow, @@ -657,7 +657,7 @@ std::vector FitsFileReader::readSpeckFile(const std::filesystem::path& fi // This is pretty annoying, the read method is not derived from the HDU class // in CCfits - need to explicitly cast to the sub classes to access read -template +template std::shared_ptr> FitsFileReader::readImageInternal(ExtHDU& image) { try { std::valarray contents; @@ -675,7 +675,7 @@ std::shared_ptr> FitsFileReader::readImageInternal(ExtHDU& image) { return nullptr; } -template +template std::shared_ptr> FitsFileReader::readImageInternal(PHDU& image) { try { std::valarray contents; diff --git a/modules/fitsfilereader/src/wsafitshelper.cpp b/modules/fitsfilereader/src/wsafitshelper.cpp index 492484901d..0b33686d2a 100644 --- a/modules/fitsfilereader/src/wsafitshelper.cpp +++ b/modules/fitsfilereader/src/wsafitshelper.cpp @@ -89,7 +89,7 @@ std::unique_ptr loadTextureFromFits( // Create texture from imagedata auto texture = std::make_unique( imageData, - glm::size3_t(fitsValues->width, fitsValues->height, 1), + glm::uvec3(fitsValues->width, fitsValues->height, 1), GL_TEXTURE_2D, ghoul::opengl::Texture::Format::Red, GL_RED, @@ -140,7 +140,7 @@ int nLayers(const std::filesystem::path& path) { } } -template +template std::shared_ptr> readImageInternal(U& image) { try { std::valarray contents; diff --git a/modules/globebrowsing/src/lrucache.inl b/modules/globebrowsing/src/lrucache.inl index 4dc774fb1c..99c8c6103a 100644 --- a/modules/globebrowsing/src/lrucache.inl +++ b/modules/globebrowsing/src/lrucache.inl @@ -27,24 +27,24 @@ namespace openspace::globebrowsing::cache { -template +template LRUCache::LRUCache(size_t size) : _maximumCacheSize(size) {} -template +template void LRUCache::clear() { _itemList.clear(); _itemMap.clear(); } -template +template void LRUCache::put(KeyType key, ValueType value) { putWithoutCleaning(std::move(key), std::move(value)); clean(); } -template +template std::vector> LRUCache::putAndFetchPopped(KeyType key, ValueType value) { @@ -52,12 +52,12 @@ LRUCache::putAndFetchPopped(KeyType key, ValueTy return cleanAndFetchPopped(); } -template +template bool LRUCache::exist(const KeyType& key) const { return (_itemMap.count(key) > 0); } -template +template bool LRUCache::touch(const KeyType& key) { ZoneScoped; @@ -84,12 +84,12 @@ bool LRUCache::touch(const KeyType& key) { } } -template +template bool LRUCache::isEmpty() const { return (_itemMap.size() == 0); } -template +template ValueType LRUCache::get(const KeyType& key) { const auto it = _itemMap.find(key); // Move list iterator pointing to value @@ -98,7 +98,7 @@ ValueType LRUCache::get(const KeyType& key) { return res; } -template +template std::pair LRUCache::popMRU() { ghoul_assert(!_itemList.empty(), "Cannot pop LRU cache. Ensure cache is not empty"); @@ -109,7 +109,7 @@ std::pair LRUCache::popMRU() return toReturn; } -template +template std::pair LRUCache::popLRU() { ghoul_assert(!_itemList.empty(), "Cannot pop LRU cache. Ensure cache is not empty"); @@ -121,17 +121,17 @@ std::pair LRUCache::popLRU() return toReturn; } -template +template size_t LRUCache::size() const { return _itemMap.size(); } -template +template size_t LRUCache::maximumCacheSize() const { return _maximumCacheSize; } -template +template void LRUCache::putWithoutCleaning(KeyType key, ValueType value) { @@ -144,7 +144,7 @@ void LRUCache::putWithoutCleaning(KeyType key, _itemMap.emplace(std::move(key), _itemList.begin()); } -template +template void LRUCache::clean() { while (_itemMap.size() > _maximumCacheSize) { auto lastIt = _itemList.end(); @@ -154,7 +154,7 @@ void LRUCache::clean() { } } -template +template std::vector> LRUCache::cleanAndFetchPopped() { diff --git a/modules/globebrowsing/src/lruthreadpool.h b/modules/globebrowsing/src/lruthreadpool.h index 6c40f07790..d5b1004bfe 100644 --- a/modules/globebrowsing/src/lruthreadpool.h +++ b/modules/globebrowsing/src/lruthreadpool.h @@ -36,9 +36,9 @@ namespace openspace::globebrowsing { -template class LRUThreadPool; +template class LRUThreadPool; -template +template class LRUThreadPoolWorker { public: explicit LRUThreadPoolWorker(LRUThreadPool& pool); @@ -58,7 +58,7 @@ private: * same key will simply be bumped and prioritised before other enqueued tasks. The given * task will be ignored. */ -template +template class LRUThreadPool { public: LRUThreadPool(size_t numThreads, size_t queueSize); diff --git a/modules/globebrowsing/src/lruthreadpool.inl b/modules/globebrowsing/src/lruthreadpool.inl index e1fcce40f8..c46de72dd1 100644 --- a/modules/globebrowsing/src/lruthreadpool.inl +++ b/modules/globebrowsing/src/lruthreadpool.inl @@ -24,12 +24,12 @@ namespace openspace::globebrowsing { -template +template LRUThreadPoolWorker::LRUThreadPoolWorker(LRUThreadPool& pool) : _pool(pool) {} -template +template void LRUThreadPoolWorker::operator()() { std::function task; while (true) { @@ -57,7 +57,7 @@ void LRUThreadPoolWorker::operator()() { } } -template +template LRUThreadPool::LRUThreadPool(size_t numThreads, size_t queueSize) : _queuedTasks(queueSize) { @@ -66,13 +66,13 @@ LRUThreadPool::LRUThreadPool(size_t numThreads, size_t queueSize) } } -template +template LRUThreadPool::LRUThreadPool(const LRUThreadPool& toCopy) : LRUThreadPool(toCopy._workers.size(), toCopy._queuedTasks.maximumCacheSize()) {} // the destructor joins all threads -template +template LRUThreadPool::~LRUThreadPool() { { std::unique_lock lock(_queueMutex); @@ -87,7 +87,7 @@ LRUThreadPool::~LRUThreadPool() { } // add new work item to the pool -template +template void LRUThreadPool::enqueue(std::function f, KeyType key) { { std::unique_lock lock(_queueMutex); @@ -107,13 +107,13 @@ void LRUThreadPool::enqueue(std::function f, KeyType key) { _condition.notify_one(); } -template +template bool LRUThreadPool::touch(KeyType key) { std::unique_lock lock(_queueMutex); return _queuedTasks.touch(key); } -template +template std::vector LRUThreadPool::getUnqueuedTasksKeys() { std::vector toReturn = _unqueuedTasks; { @@ -123,7 +123,7 @@ std::vector LRUThreadPool::getUnqueuedTasksKeys() { return toReturn; } -template +template std::vector LRUThreadPool::getQueuedTasksKeys() { std::vector queuedTasks; { @@ -135,7 +135,7 @@ std::vector LRUThreadPool::getQueuedTasksKeys() { return queuedTasks; } -template +template void LRUThreadPool::clearEnqueuedTasks() { std::unique_lock lock(_queueMutex); _queuedTasks.clear(); diff --git a/modules/globebrowsing/src/prioritizingconcurrentjobmanager.h b/modules/globebrowsing/src/prioritizingconcurrentjobmanager.h index 0cbdf76f27..d7319d6a6c 100644 --- a/modules/globebrowsing/src/prioritizingconcurrentjobmanager.h +++ b/modules/globebrowsing/src/prioritizingconcurrentjobmanager.h @@ -39,7 +39,7 @@ namespace openspace::globebrowsing { * which is used to identify jobs. In case a job need to be explicitly ended. It can be * identified using its key. */ -template +template class PrioritizingConcurrentJobManager { public: explicit PrioritizingConcurrentJobManager(LRUThreadPool pool); diff --git a/modules/multiresvolume/rendering/renderablemultiresvolume.cpp b/modules/multiresvolume/rendering/renderablemultiresvolume.cpp index f26746f1b6..2221517c38 100644 --- a/modules/multiresvolume/rendering/renderablemultiresvolume.cpp +++ b/modules/multiresvolume/rendering/renderablemultiresvolume.cpp @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include diff --git a/modules/server/include/serverinterface.h b/modules/server/include/serverinterface.h index 03ec0a0cf2..42117f5297 100644 --- a/modules/server/include/serverinterface.h +++ b/modules/server/include/serverinterface.h @@ -31,8 +31,7 @@ #include #include #include - -namespace ghoul::io { class SocketServer; } +#include namespace openspace { diff --git a/modules/server/src/serverinterface.cpp b/modules/server/src/serverinterface.cpp index 1654ec89f4..f600a8591c 100644 --- a/modules/server/src/serverinterface.cpp +++ b/modules/server/src/serverinterface.cpp @@ -28,7 +28,6 @@ #include #include #include -#include namespace { constexpr openspace::properties::Property::PropertyInfo EnabledInfo = { diff --git a/modules/volume/lrucache.h b/modules/volume/lrucache.h index e857efe991..8111c00703 100644 --- a/modules/volume/lrucache.h +++ b/modules/volume/lrucache.h @@ -31,10 +31,10 @@ namespace openspace::volume { -template< +template < typename KeyType, typename ValueType, - template class ContainerType + template class ContainerType > class LruCache { public: diff --git a/modules/volume/lrucache.inl b/modules/volume/lrucache.inl index d9d04c0589..d6292d2aff 100644 --- a/modules/volume/lrucache.inl +++ b/modules/volume/lrucache.inl @@ -24,18 +24,18 @@ namespace openspace::volume { -template class ContainerType> -LruCache::LruCache(size_t capacity) { +template class Container> +LruCache::LruCache(size_t capacity) { _capacity = capacity; } -template class ContainerType> -bool LruCache::has(const KeyType& key) { +template class Container> +bool LruCache::has(const Key& key) { return (_cache.find(key) != _cache.end()); } -template class ContainerType> -void LruCache::set(const KeyType& key, ValueType value) +template class Container> +void LruCache::set(const Key& key, Value value) { auto prev = _cache.find(key); if (prev != _cache.end()) { @@ -48,35 +48,33 @@ void LruCache::set(const KeyType& key, ValueT } } -template class ContainerType> -ValueType& LruCache::use(const KeyType& key) { +template class Container> +ValueType& LruCache::use(const Key& key) { auto iter = _cache.find(key); std::list::iterator trackerIter = iter->second.second; _tracker.splice(_tracker.end(), _tracker, trackerIter); return iter->second.first; } -template class ContainerType> -ValueType& LruCache::get(const KeyType& key) { +template class Container> +ValueType& LruCache::get(const Key& key) { auto iter = _cache.find(key); return iter->second.first; } -template class ContainerType> -void LruCache::evict() { +template class Container> +void LruCache::evict() { _cache.erase(_cache.find(_tracker.front())); _tracker.pop_front(); } -template class ContainerType> -size_t LruCache::capacity() const { +template class Container> +size_t LruCache::capacity() const { return _capacity; } -template class ContainerType> -void LruCache::insert(const KeyType& key, - const ValueType& value) -{ +template class Container> +void LruCache::insert(const Key& key, const Value& value) { if (_cache.size() == _capacity) { evict(); } diff --git a/modules/volume/rawvolume.inl b/modules/volume/rawvolume.inl index 703c712db2..b88c2e7085 100644 --- a/modules/volume/rawvolume.inl +++ b/modules/volume/rawvolume.inl @@ -45,7 +45,7 @@ void RawVolume::setDimensions(const glm::uvec3& dimensions) { _data.resize(nCells()); } -template +template size_t RawVolume::nCells() const { return static_cast(_dimensions.x) * static_cast(_dimensions.y) * diff --git a/src/camera/camera.cpp b/src/camera/camera.cpp index 0a9a9453d8..538b2d55d2 100644 --- a/src/camera/camera.cpp +++ b/src/camera/camera.cpp @@ -25,7 +25,6 @@ #include #include -#include namespace openspace { diff --git a/src/data/csvloader.cpp b/src/data/csvloader.cpp index 6df532d5ab..76a766aafa 100644 --- a/src/data/csvloader.cpp +++ b/src/data/csvloader.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include diff --git a/src/data/dataloader.cpp b/src/data/dataloader.cpp index ac286aaae0..2d1592a00c 100644 --- a/src/data/dataloader.cpp +++ b/src/data/dataloader.cpp @@ -27,14 +27,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include diff --git a/src/data/speckloader.cpp b/src/data/speckloader.cpp index c192ab8e15..f25516fd1e 100644 --- a/src/data/speckloader.cpp +++ b/src/data/speckloader.cpp @@ -24,20 +24,15 @@ #include -#include -#include -#include #include #include #include #include #include #include -#include #include #include - namespace { bool startsWith(std::string lhs, std::string_view rhs) noexcept { lhs = ghoul::toLowerCase(lhs); diff --git a/src/documentation/documentation.cpp b/src/documentation/documentation.cpp index fa0ccafc51..6ab68fb776 100644 --- a/src/documentation/documentation.cpp +++ b/src/documentation/documentation.cpp @@ -27,8 +27,10 @@ #include #include #include -#include +#include #include +#include +#include namespace { diff --git a/src/documentation/documentationengine.cpp b/src/documentation/documentationengine.cpp index 6b44f0b25b..7c1edcd2ed 100644 --- a/src/documentation/documentationengine.cpp +++ b/src/documentation/documentationengine.cpp @@ -24,7 +24,6 @@ #include -#include #include #include #include @@ -39,7 +38,6 @@ #include #include #include -#include #include #include #include @@ -55,81 +53,80 @@ namespace { constexpr std::string_view _loggerCat = "DocumentationEngine"; // General keys - constexpr const char* NameKey = "name"; - constexpr const char* IdentifierKey = "identifier"; - constexpr const char* DescriptionKey = "description"; - constexpr const char* DataKey = "data"; - constexpr const char* TypeKey = "type"; - constexpr const char* DocumentationKey = "documentation"; - constexpr const char* ActionKey = "action"; - constexpr const char* IdKey = "id"; + constexpr std::string_view NameKey = "name"; + constexpr std::string_view IdentifierKey = "identifier"; + constexpr std::string_view DescriptionKey = "description"; + constexpr std::string_view DataKey = "data"; + constexpr std::string_view TypeKey = "type"; + constexpr std::string_view DocumentationKey = "documentation"; + constexpr std::string_view ActionKey = "action"; + constexpr std::string_view IdKey = "id"; // Actions - constexpr const char* ActionTitle = "Actions"; - constexpr const char* GuiNameKey = "guiName"; - constexpr const char* CommandKey = "command"; - constexpr const char* ColorKey = "color"; - constexpr const char* TextColorKey = "textColor"; + constexpr std::string_view ActionTitle = "Actions"; + constexpr std::string_view GuiNameKey = "guiName"; + constexpr std::string_view CommandKey = "command"; + constexpr std::string_view ColorKey = "color"; + constexpr std::string_view TextColorKey = "textColor"; // Factory - constexpr const char* MembersKey = "members"; - constexpr const char* OptionalKey = "optional"; - constexpr const char* ReferenceKey = "reference"; - constexpr const char* FoundKey = "found"; - constexpr const char* ClassesKey = "classes"; + constexpr std::string_view MembersKey = "members"; + constexpr std::string_view OptionalKey = "optional"; + constexpr std::string_view ReferenceKey = "reference"; + constexpr std::string_view FoundKey = "found"; + constexpr std::string_view ClassesKey = "classes"; - constexpr const char* OtherName = "Other"; - constexpr const char* OtherIdentifierName = "other"; - constexpr const char* propertyOwnerName = "propertyOwner"; - constexpr const char* categoryName = "category"; + constexpr std::string_view OtherName = "Other"; + constexpr std::string_view OtherIdentifierName = "other"; + constexpr std::string_view PropertyOwnerName = "propertyOwner"; + constexpr std::string_view CategoryName = "category"; // Properties - constexpr const char* SettingsTitle = "Settings"; - constexpr const char* SceneTitle = "Scene"; - constexpr const char* PropertiesKeys = "properties"; - constexpr const char* PropertyOwnersKey = "propertyOwners"; - constexpr const char* TagsKey = "tags"; - constexpr const char* UriKey = "uri"; + constexpr std::string_view SettingsTitle = "Settings"; + constexpr std::string_view SceneTitle = "Scene"; + constexpr std::string_view PropertiesKeys = "properties"; + constexpr std::string_view PropertyOwnersKey = "propertyOwners"; + constexpr std::string_view TagsKey = "tags"; + constexpr std::string_view UriKey = "uri"; // Scripting - constexpr const char* DefaultValueKey = "defaultValue"; - constexpr const char* ArgumentsKey = "arguments"; - constexpr const char* ReturnTypeKey = "returnType"; - constexpr const char* HelpKey = "help"; - constexpr const char* FileKey = "file"; - constexpr const char* LineKey = "line"; - constexpr const char* LibraryKey = "library"; - constexpr const char* FullNameKey = "fullName"; - constexpr const char* FunctionsKey = "functions"; - constexpr const char* SourceLocationKey = "sourceLocation"; - constexpr const char* OpenSpaceScriptingKey = "openspace"; + constexpr std::string_view DefaultValueKey = "defaultValue"; + constexpr std::string_view ArgumentsKey = "arguments"; + constexpr std::string_view ReturnTypeKey = "returnType"; + constexpr std::string_view HelpKey = "help"; + constexpr std::string_view FileKey = "file"; + constexpr std::string_view LineKey = "line"; + constexpr std::string_view LibraryKey = "library"; + constexpr std::string_view FullNameKey = "fullName"; + constexpr std::string_view FunctionsKey = "functions"; + constexpr std::string_view SourceLocationKey = "sourceLocation"; + constexpr std::string_view OpenSpaceScriptingKey = "openspace"; // Licenses - constexpr const char* LicensesTitle = "Licenses"; - constexpr const char* ProfileName = "Profile"; - constexpr const char* AssetsName = "Assets"; - constexpr const char* LicensesName = "Licenses"; - constexpr const char* NoLicenseName = "No License"; - constexpr const char* NoDataName = ""; + constexpr std::string_view LicensesTitle = "Licenses"; + constexpr std::string_view ProfileName = "Profile"; + constexpr std::string_view AssetsName = "Assets"; + constexpr std::string_view LicensesName = "Licenses"; + constexpr std::string_view NoLicenseName = "No License"; - constexpr const char* ProfileNameKey = "profileName"; - constexpr const char* VersionKey = "version"; - constexpr const char* AuthorKey = "author"; - constexpr const char* UrlKey = "url"; - constexpr const char* LicenseKey = "license"; - constexpr const char* IdentifiersKey = "identifiers"; - constexpr const char* PathKey = "path"; - constexpr const char* AssetKey = "assets"; - constexpr const char* LicensesKey = "licenses"; + constexpr std::string_view ProfileNameKey = "profileName"; + constexpr std::string_view VersionKey = "version"; + constexpr std::string_view AuthorKey = "author"; + constexpr std::string_view UrlKey = "url"; + constexpr std::string_view LicenseKey = "license"; + constexpr std::string_view IdentifiersKey = "identifiers"; + constexpr std::string_view PathKey = "path"; + constexpr std::string_view AssetKey = "assets"; + constexpr std::string_view LicensesKey = "licenses"; // Keybindings - constexpr const char* KeybindingsTitle = "Keybindings"; - constexpr const char* KeybindingsKey = "keybindings"; + constexpr std::string_view KeybindingsTitle = "Keybindings"; + constexpr std::string_view KeybindingsKey = "keybindings"; // Events - constexpr const char* EventsTitle = "Events"; - constexpr const char* FiltersKey = "filters"; - constexpr const char* ActionsKey = "actions"; + constexpr std::string_view EventsTitle = "Events"; + constexpr std::string_view FiltersKey = "filters"; + constexpr std::string_view ActionsKey = "actions"; nlohmann::json documentationToJson( const openspace::documentation::Documentation& documentation) @@ -242,7 +239,7 @@ namespace { nlohmann::json argument; argument[NameKey] = arg.name; argument[TypeKey] = arg.type; - argument[DefaultValueKey] = arg.defaultValue.value_or(NoDataName); + argument[DefaultValueKey] = arg.defaultValue.value_or(""); arguments.push_back(argument); } @@ -314,8 +311,9 @@ nlohmann::json DocumentationEngine::generateScriptEngineJson() const { // Keep the library key for backwards compatability library[LibraryKey] = libraryName; library[NameKey] = libraryName; - std::string os = OpenSpaceScriptingKey; - library[FullNameKey] = libraryName.empty() ? os : os + "." + libraryName; + std::string_view os = OpenSpaceScriptingKey; + library[FullNameKey] = + libraryName.empty() ? os : std::format("{}.{}", os, libraryName); for (const LuaLibrary::Function& f : l.functions) { constexpr bool HasSourceLocation = true; @@ -342,12 +340,12 @@ nlohmann::json DocumentationEngine::generateLicenseGroupsJson() const { nlohmann::json metaJson; metaJson[NameKey] = ProfileName; - metaJson[ProfileNameKey] = meta.name.value_or(NoDataName); - metaJson[VersionKey] = meta.version.value_or(NoDataName); - metaJson[DescriptionKey] = meta.description.value_or(NoDataName); - metaJson[AuthorKey] = meta.author.value_or(NoDataName); - metaJson[UrlKey] = meta.url.value_or(NoDataName); - metaJson[LicenseKey] = meta.license.value_or(NoDataName); + metaJson[ProfileNameKey] = meta.name.value_or(""); + metaJson[VersionKey] = meta.version.value_or(""); + metaJson[DescriptionKey] = meta.description.value_or(""); + metaJson[AuthorKey] = meta.author.value_or(""); + metaJson[UrlKey] = meta.url.value_or(""); + metaJson[LicenseKey] = meta.license.value_or(""); json.push_back(std::move(metaJson)); } @@ -360,17 +358,17 @@ nlohmann::json DocumentationEngine::generateLicenseGroupsJson() const { std::optional meta = asset->metaInformation(); // Ensure the license is not going to be an empty string - std::string licenseName = NoLicenseName; - if (meta.has_value() && meta->license != NoDataName) { + std::string licenseName = std::string(NoLicenseName); + if (meta.has_value() && !meta->license.empty()) { licenseName = meta->license; } nlohmann::json assetJson; - assetJson[NameKey] = meta.has_value() ? meta->name : NoDataName; - assetJson[VersionKey] = meta.has_value() ? meta->version : NoDataName; - assetJson[DescriptionKey] = meta.has_value() ? meta->description : NoDataName; - assetJson[AuthorKey] = meta.has_value() ? meta->author : NoDataName; - assetJson[UrlKey] = meta.has_value() ? meta->url : NoDataName; + assetJson[NameKey] = meta.has_value() ? meta->name : ""; + assetJson[VersionKey] = meta.has_value() ? meta->version : ""; + assetJson[DescriptionKey] = meta.has_value() ? meta->description : ""; + assetJson[AuthorKey] = meta.has_value() ? meta->author : ""; + assetJson[UrlKey] = meta.has_value() ? meta->url : ""; assetJson[LicenseKey] = licenseName; assetJson[PathKey] = asset->path().string(); assetJson[IdKey] = asset->path().string(); @@ -406,12 +404,12 @@ nlohmann::json DocumentationEngine::generateLicenseListJson() const { if (global::profile->meta.has_value()) { nlohmann::json profile; - profile[NameKey] = global::profile->meta->name.value_or(NoDataName); - profile[VersionKey] = global::profile->meta->version.value_or(NoDataName); - profile[DescriptionKey] = global::profile->meta->description.value_or(NoDataName); - profile[AuthorKey] = global::profile->meta->author.value_or(NoDataName); - profile[UrlKey] = global::profile->meta->url.value_or(NoDataName); - profile[LicenseKey] = global::profile->meta->license.value_or(NoDataName); + profile[NameKey] = global::profile->meta->name.value_or(""); + profile[VersionKey] = global::profile->meta->version.value_or(""); + profile[DescriptionKey] = global::profile->meta->description.value_or(""); + profile[AuthorKey] = global::profile->meta->author.value_or(""); + profile[UrlKey] = global::profile->meta->url.value_or(""); + profile[LicenseKey] = global::profile->meta->license.value_or(""); json.push_back(profile); } @@ -505,7 +503,7 @@ nlohmann::json DocumentationEngine::generateFactoryManagerJson() const { } nlohmann::json factory; factory[NameKey] = factoryInfo.name; - factory[IdentifierKey] = categoryName + factoryInfo.name; + factory[IdentifierKey] = std::format("{}{}", CategoryName, factoryInfo.name); ghoul::TemplateFactoryBase* f = factoryInfo.factory.get(); // Add documentation about base class @@ -615,7 +613,7 @@ nlohmann::json DocumentationEngine::generatePropertyOwnerJson( sortJson(json, NameKey); nlohmann::json result; - result[NameKey] = propertyOwnerName; + result[NameKey] = PropertyOwnerName; result[DataKey] = json; return result; @@ -710,7 +708,6 @@ nlohmann::json DocumentationEngine::generateActionJson() const { return res; } - void DocumentationEngine::addDocumentation(Documentation documentation) { if (documentation.id.empty()) { _documentations.push_back(std::move(documentation)); @@ -737,4 +734,5 @@ void DocumentationEngine::addDocumentation(Documentation documentation) { std::vector DocumentationEngine::documentations() const { return _documentations; } + } // namespace openspace::documentation diff --git a/src/engine/configuration.cpp b/src/engine/configuration.cpp index 4553b68c89..ed7efa1e79 100644 --- a/src/engine/configuration.cpp +++ b/src/engine/configuration.cpp @@ -28,15 +28,24 @@ #include #include #include -#include -#include -#include #include -#include +#include #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include namespace { // We can't use ${SCRIPTS} here as that hasn't been defined by this point diff --git a/src/engine/downloadmanager.cpp b/src/engine/downloadmanager.cpp index df1a1cdeaa..4674cbf760 100644 --- a/src/engine/downloadmanager.cpp +++ b/src/engine/downloadmanager.cpp @@ -24,8 +24,6 @@ #include -#include -#include #include #include #include @@ -142,18 +140,14 @@ std::shared_ptr DownloadManager::downloadFile( const std::string f = file.string(); errno_t error = fopen_s(&fp, f.c_str(), "wb"); if (error != 0) { - LERROR(std::format( - "Could not open/create file: {}. Errno: {}", file, errno - )); + LERROR(std::format("Could not open/create file: {}. Errno: {}", file, errno)); } #else const std::string f = file.string(); FILE* fp = fopen(f.c_str(), "wb"); // write binary #endif // WIN32 if (!fp) { - LERROR(std::format( - "Could not open/create file: {}. Errno: {}", file, errno - )); + LERROR(std::format("Could not open/create file: {}. Errno: {}", file, errno)); } auto downloadFunction = [url, failOnError, timeout_secs, diff --git a/src/engine/globals.cpp b/src/engine/globals.cpp index dca1a827a4..c8407caab1 100644 --- a/src/engine/globals.cpp +++ b/src/engine/globals.cpp @@ -57,13 +57,10 @@ #include #include #include -#include #include #include -#include #include #include -#include #include namespace openspace { diff --git a/src/engine/logfactory.cpp b/src/engine/logfactory.cpp index e5688a361b..4cf4494b0d 100644 --- a/src/engine/logfactory.cpp +++ b/src/engine/logfactory.cpp @@ -25,13 +25,11 @@ #include #include -#include #include #include #include #include #include -#include #include namespace { diff --git a/src/engine/moduleengine.cpp b/src/engine/moduleengine.cpp index a45ee061d4..c943382198 100644 --- a/src/engine/moduleengine.cpp +++ b/src/engine/moduleengine.cpp @@ -25,10 +25,8 @@ #include #include -#include #include #include -#include #include #include #include diff --git a/src/engine/moduleengine_lua.inl b/src/engine/moduleengine_lua.inl index e9bb73e33c..6ac8202744 100644 --- a/src/engine/moduleengine_lua.inl +++ b/src/engine/moduleengine_lua.inl @@ -22,9 +22,13 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ +#include + namespace { -// Checks whether the passed OpenSpaceModule is loaded. +/** + * Checks whether the passed OpenSpaceModule is loaded. + */ [[codegen::luawrap]] bool isLoaded(std::string moduleName) { using namespace openspace; diff --git a/src/engine/openspaceengine.cpp b/src/engine/openspaceengine.cpp index 285fe6be50..695cf04c9f 100644 --- a/src/engine/openspaceengine.cpp +++ b/src/engine/openspaceengine.cpp @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include @@ -47,12 +46,10 @@ #include #include #include -#include #include #include #include #include -#include #include #include #include @@ -62,13 +59,11 @@ #include #include #include -#include #include #include #include #include #include -#include #include #include #include @@ -82,7 +77,6 @@ #include #include #include -#include #include #include #include diff --git a/src/engine/openspaceengine_lua.inl b/src/engine/openspaceengine_lua.inl index 10acdbfae4..305450178c 100644 --- a/src/engine/openspaceengine_lua.inl +++ b/src/engine/openspaceengine_lua.inl @@ -25,9 +25,9 @@ #include #include #include -#include #include #include +#include #include #include #include @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -46,20 +47,22 @@ namespace { /** * Toggles the shutdown mode that will close the application after the countdown timer - * is reached + * is reached. */ [[codegen::luawrap]] void toggleShutdown() { openspace::global::openSpaceEngine->toggleShutdownMode(); } /** - * Writes out documentation files + * Writes out documentation files. */ [[codegen::luawrap]] void writeDocumentation() { DocEng.writeJavascriptDocumentation(); } -// Sets the folder used for storing screenshots or session recording frames +/** + * Sets the folder used for storing screenshots or session recording frames. + */ [[codegen::luawrap]] void setScreenshotFolder(std::string newFolder) { using namespace openspace; @@ -77,7 +80,9 @@ namespace { global::windowDelegate->setScreenshotFolder(std::move(folder)); } -// Adds a Tag to a SceneGraphNode identified by the provided uri +/** + * Adds a Tag to a SceneGraphNode identified by the provided uri. + */ [[codegen::luawrap]] void addTag(std::string uri, std::string tag) { using namespace openspace; @@ -89,7 +94,9 @@ namespace { node->addTag(std::move(tag)); } -// Removes a tag (second argument) from a scene graph node (first argument) +/** + * Removes a tag(second argument) from a scene graph node (first argument). + */ [[codegen::luawrap]] void removeTag(std::string uri, std::string tag) { using namespace openspace; @@ -101,7 +108,9 @@ namespace { node->removeTag(tag); } -// Downloads a file from Lua interpreter +/** + * Downloads a file from Lua interpreter. + */ [[codegen::luawrap]] void downloadFile(std::string url, std::string savePath, bool waitForCompletion = false, bool overrideExistingFile = true) diff --git a/src/engine/settings.cpp b/src/engine/settings.cpp index 2bdc562a17..6aeeb00c37 100644 --- a/src/engine/settings.cpp +++ b/src/engine/settings.cpp @@ -31,8 +31,7 @@ namespace openspace { namespace { template -std::optional get_to(nlohmann::json& obj, const std::string& key) -{ +std::optional get_to(nlohmann::json& obj, const std::string& key) { auto it = obj.find(key); if (it != obj.end()) { return it->get(); @@ -44,7 +43,7 @@ std::optional get_to(nlohmann::json& obj, const std::string& key) } // namespace namespace version1 { - Settings parseSettings(nlohmann::json json) { + static Settings parseSettings(nlohmann::json json) { ghoul_assert(json.at("version").get() == 1, "Wrong value"); Settings settings; diff --git a/src/engine/syncengine.cpp b/src/engine/syncengine.cpp index 1cceb42b3a..7ae604c202 100644 --- a/src/engine/syncengine.cpp +++ b/src/engine/syncengine.cpp @@ -24,7 +24,7 @@ #include -#include +#include #include #include #include diff --git a/src/events/event.cpp b/src/events/event.cpp index e897f328d7..52f43fca94 100644 --- a/src/events/event.cpp +++ b/src/events/event.cpp @@ -43,7 +43,7 @@ using namespace std::string_literals; namespace openspace::events { -void log(int i, const EventParallelConnection& e) { +static void log(int i, const EventParallelConnection& e) { ghoul_assert(e.type == EventParallelConnection::Type, "Wrong type"); std::string_view state = [](EventParallelConnection::State s) { switch (s) { @@ -57,12 +57,12 @@ void log(int i, const EventParallelConnection& e) { LINFO(std::format("[{}] ParallelConnection ({})", i, state)); } -void log(int i, [[maybe_unused]] const EventProfileLoadingFinished& e) { +static void log(int i, [[maybe_unused]] const EventProfileLoadingFinished& e) { ghoul_assert(e.type == EventProfileLoadingFinished::Type, "Wrong type"); LINFO(std::format("[{}] ProfileLoadingFinished", i)); } -void log(int i, const EventAssetLoading& e) { +static void log(int i, const EventAssetLoading& e) { ghoul_assert(e.type == EventAssetLoading::Type, "Wrong type"); std::string_view state = [](EventAssetLoading::State s) { switch (s) { @@ -76,7 +76,7 @@ void log(int i, const EventAssetLoading& e) { LINFO(std::format("[{}] AssetLoading: '{}': ({})", i, e.assetPath, state)); } -void log(int i, const EventApplicationShutdown& e) { +static void log(int i, const EventApplicationShutdown& e) { ghoul_assert(e.type == EventApplicationShutdown::Type, "Wrong type"); const std::string t = [](EventApplicationShutdown::State state) { switch (state) { @@ -89,7 +89,7 @@ void log(int i, const EventApplicationShutdown& e) { LINFO(std::format("[{}] ApplicationShutdown", i)); } -void log(int i, const EventCameraFocusTransition& e) { +static void log(int i, const EventCameraFocusTransition& e) { ghoul_assert(e.type == EventCameraFocusTransition::Type, "Wrong type"); std::string_view t = [](EventCameraFocusTransition::Transition transition) { switch (transition) { @@ -112,7 +112,7 @@ void log(int i, const EventCameraFocusTransition& e) { )); } -void log(int i, const EventTimeOfInterestReached& e) { +static void log(int i, const EventTimeOfInterestReached& e) { ghoul_assert(e.type == EventTimeOfInterestReached::Type, "Wrong type"); LINFO(std::format( "[{}] TimeOfInterestReached: {}, {}", @@ -120,57 +120,57 @@ void log(int i, const EventTimeOfInterestReached& e) { )); } -void log(int i, const EventMissionAdded& e) { +static void log(int i, const EventMissionAdded& e) { ghoul_assert(e.type == EventMissionAdded::Type, "Wrong type"); LINFO(std::format("[{}] MissionAdded: {}", i, e.identifier)); } -void log(int i, const EventMissionRemoved& e) { +static void log(int i, const EventMissionRemoved& e) { ghoul_assert(e.type == EventMissionRemoved::Type, "Wrong type"); LINFO(std::format("[{}] MissionRemoved: {}", i, e.identifier)); } -void log(int i, [[maybe_unused]] const EventMissionEventReached& e) { +static void log(int i, [[maybe_unused]] const EventMissionEventReached& e) { ghoul_assert(e.type == EventMissionEventReached::Type, "Wrong type"); LINFO(std::format("[{}] MissionEventReached", i)); } -void log(int i, const EventPlanetEclipsed& e) { +static void log(int i, const EventPlanetEclipsed& e) { ghoul_assert(e.type == EventPlanetEclipsed::Type, "Wrong type"); LINFO(std::format("[{}] PlanetEclipsed: {} -> {}", i, e.eclipsee, e.eclipser)); } -void log(int i, [[maybe_unused]] const EventInterpolationFinished& e) { +static void log(int i, [[maybe_unused]] const EventInterpolationFinished& e) { ghoul_assert(e.type == EventInterpolationFinished::Type, "Wrong type"); LINFO(std::format("[{}] InterpolationFinished", i)); } -void log(int i, const EventFocusNodeChanged& e) { +static void log(int i, const EventFocusNodeChanged& e) { ghoul_assert(e.type == EventFocusNodeChanged::Type, "Wrong type"); LINFO(std::format("[{}] FocusNodeChanged: {} -> {}", i, e.oldNode, e.newNode)); } -void log(int i, const EventPropertyTreeUpdated& e) { +static void log(int i, const EventPropertyTreeUpdated& e) { ghoul_assert(e.type == EventPropertyTreeUpdated::Type, "Wrong type"); LINFO(std::format("[{}] PropertyTreeUpdated: {}", i, e.uri)); } -void log(int i, const EventPropertyTreePruned& e) { +static void log(int i, const EventPropertyTreePruned& e) { ghoul_assert(e.type == EventPropertyTreePruned::Type, "Wrong type"); LINFO(std::format("[{}] PropertyTreePruned: {}", i, e.uri)); } -void log(int i, const EventActionAdded& e) { +static void log(int i, const EventActionAdded& e) { ghoul_assert(e.type == EventActionAdded::Type, "Wrong type"); LINFO(std::format("[{}] ActionAdded: {}", i, e.uri)); } -void log(int i, const EventActionRemoved& e) { +static void log(int i, const EventActionRemoved& e) { ghoul_assert(e.type == EventActionRemoved::Type, "Wrong type"); LINFO(std::format("[{}] ActionRemoved: {}", i, e.uri)); } -void log(int i, const EventSessionRecordingPlayback& e) { +static void log(int i, const EventSessionRecordingPlayback& e) { ghoul_assert(e.type == EventSessionRecordingPlayback::Type, "Wrong type"); std::string_view state = [](EventSessionRecordingPlayback::State s) { @@ -186,7 +186,7 @@ void log(int i, const EventSessionRecordingPlayback& e) { LINFO(std::format("[{}] SessionRecordingPlayback: {}", i, state)); } -void log(int i, const EventPointSpacecraft& e) { +static void log(int i, const EventPointSpacecraft& e) { ghoul_assert(e.type == EventPointSpacecraft::Type, "Wrong type"); LINFO(std::format( "[{}] PointSpacecraft: Ra: {}, Dec: {}, Duration: {}", i, e.ra, e.dec, @@ -194,17 +194,17 @@ void log(int i, const EventPointSpacecraft& e) { )); } -void log(int i, const EventRenderableEnabled& e) { +static void log(int i, const EventRenderableEnabled& e) { ghoul_assert(e.type == EventRenderableEnabled::Type, "Wrong type"); LINFO(std::format("[{}] EventRenderableEnabled: {}", i, e.node)); } -void log(int i, const EventRenderableDisabled& e) { +static void log(int i, const EventRenderableDisabled& e) { ghoul_assert(e.type == EventRenderableDisabled::Type, "Wrong type"); LINFO(std::format("[{}] EventRenderableDisabled: {}", i, e.node)); } -void log(int i, const EventCameraPathStarted& e) { +static void log(int i, const EventCameraPathStarted& e) { ghoul_assert(e.type == EventCameraPathStarted::Type, "Wrong type"); LINFO(std::format( "[{}] EventCameraPathStarted: Origin: '{}' Destination: '{}'", @@ -212,7 +212,7 @@ void log(int i, const EventCameraPathStarted& e) { )); } -void log(int i, const EventCameraPathFinished& e) { +static void log(int i, const EventCameraPathFinished& e) { ghoul_assert(e.type == EventCameraPathFinished::Type, "Wrong type"); LINFO(std::format( "[{}] EventCameraPathFinished: Origin: '{}' Destination: '{}'", @@ -220,22 +220,22 @@ void log(int i, const EventCameraPathFinished& e) { )); } -void log(int i, const EventCameraMovedPosition& e) { +static void log(int i, const EventCameraMovedPosition& e) { ghoul_assert(e.type == EventCameraMovedPosition::Type, "Wrong type"); LINFO(std::format("[{}] EventCameraMovedPosition", i)); } -void log(int i, const EventScheduledScriptExecuted& e) { +static void log(int i, const EventScheduledScriptExecuted& e) { ghoul_assert(e.type == EventScheduledScriptExecuted::Type, "Wrong type"); LINFO(std::format("[{}] ScheduledScriptExecuted: Script '{}'", i, e.script)); } -void log(int i, const EventGuiTreeUpdated& e) { +static void log(int i, const EventGuiTreeUpdated& e) { ghoul_assert(e.type == EventGuiTreeUpdated::Type, "Wrong type"); LINFO(std::format("[{}] EventGuiTreeUpdated", i)); } -void log(int i, const CustomEvent& e) { +static void log(int i, const CustomEvent& e) { ghoul_assert(e.type == CustomEvent::Type, "Wrong type"); LINFO(std::format("[{}] CustomEvent: {} ({})", i, e.subtype, e.payload)); } diff --git a/src/interaction/actionmanager_lua.inl b/src/interaction/actionmanager_lua.inl index 4d752fe875..782cabbc21 100644 --- a/src/interaction/actionmanager_lua.inl +++ b/src/interaction/actionmanager_lua.inl @@ -27,7 +27,9 @@ namespace { -// Checks if the passed identifier corresponds to an action. +/** + * Checks if the passed identifier corresponds to an action. + */ [[codegen::luawrap]] bool hasAction(std::string identifier) { if (identifier.empty()) { throw ghoul::lua::LuaError("Identifier must not be empty"); @@ -73,20 +75,20 @@ namespace { } struct [[codegen::Dictionary(Action)]] Action { - // The identifier under which the action is registered + /// The identifier under which the action is registered std::string identifier; - // The Lua script that is to be executed when the action is triggered + /// The Lua script that is to be executed when the action is triggered std::string command; - // The user-facing name of the action + /// The user-facing name of the action std::optional name; - // A documentation that explains what the action does + /// A documentation that explains what the action does std::optional documentation; - // The path in the GUI under which the action is shown to the user. If the value is - // not provided, the default value is / + /// The path in the GUI under which the action is shown to the user. If the value is + /// not provided, the default value is / std::optional guiPath; /// This parameter, if specified, will be used as a hint to any potential user @@ -99,10 +101,11 @@ struct [[codegen::Dictionary(Action)]] Action { /// group similar Actions together std::optional textColor [[codegen::color()]]; - // Determines whether the provided command will be executed locally or will be sent to - // connected computers in a cluster or parallel connection environment + /// Determines whether the provided command will be executed locally or will be sent + /// to connected computers in a cluster or parallel connection environment std::optional isLocal; }; + /** * Registers a new action. The first argument is the identifier which cannot have been * used to register a previous action before, the second argument is the Lua command that @@ -204,7 +207,9 @@ struct [[codegen::Dictionary(Action)]] Action { return res; } -// Triggers the action given by the specified identifier. +/** + * Triggers the action given by the specified identifier. + */ [[codegen::luawrap]] void triggerAction(std::string id, ghoul::Dictionary arg = ghoul::Dictionary()) { diff --git a/src/interaction/interactionmonitor.cpp b/src/interaction/interactionmonitor.cpp index 6e66442405..97f11bfeac 100644 --- a/src/interaction/interactionmonitor.cpp +++ b/src/interaction/interactionmonitor.cpp @@ -26,7 +26,6 @@ #include #include -#include namespace { constexpr openspace::properties::Property::PropertyInfo IdleTimeInfo = { diff --git a/src/interaction/joystickcamerastates.cpp b/src/interaction/joystickcamerastates.cpp index f5c4acb38a..dd1c6a5bdd 100644 --- a/src/interaction/joystickcamerastates.cpp +++ b/src/interaction/joystickcamerastates.cpp @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/src/interaction/joystickinputstate.cpp b/src/interaction/joystickinputstate.cpp index 8ca2113de1..ef5303dc42 100644 --- a/src/interaction/joystickinputstate.cpp +++ b/src/interaction/joystickinputstate.cpp @@ -26,9 +26,7 @@ #include #include -#include #include -#include #include namespace openspace::interaction { diff --git a/src/interaction/keybindingmanager.cpp b/src/interaction/keybindingmanager.cpp index 881095118e..b437c5d82f 100644 --- a/src/interaction/keybindingmanager.cpp +++ b/src/interaction/keybindingmanager.cpp @@ -27,11 +27,7 @@ #include #include #include -#include #include -#include -#include -#include #include "keybindingmanager_lua.inl" diff --git a/src/interaction/websocketcamerastates.cpp b/src/interaction/websocketcamerastates.cpp index 55f14fbb4c..a0c679120f 100644 --- a/src/interaction/websocketcamerastates.cpp +++ b/src/interaction/websocketcamerastates.cpp @@ -24,12 +24,8 @@ #include -#include -#include -#include -#include -#include #include +#include namespace openspace::interaction { diff --git a/src/interaction/websocketinputstate.cpp b/src/interaction/websocketinputstate.cpp index b0dcd4486e..2b6ce9e357 100644 --- a/src/interaction/websocketinputstate.cpp +++ b/src/interaction/websocketinputstate.cpp @@ -24,11 +24,8 @@ #include -#include #include -#include #include -#include #include namespace openspace::interaction { diff --git a/src/mission/mission.cpp b/src/mission/mission.cpp index 346334d37f..307030c2da 100644 --- a/src/mission/mission.cpp +++ b/src/mission/mission.cpp @@ -24,9 +24,8 @@ #include -#include + #include #include -#include #include #include #include diff --git a/src/mission/missionmanager.cpp b/src/mission/missionmanager.cpp index 1d5cc61f23..d107441528 100644 --- a/src/mission/missionmanager.cpp +++ b/src/mission/missionmanager.cpp @@ -26,11 +26,7 @@ #include #include -#include -#include -#include #include -#include #include "missionmanager_lua.inl" diff --git a/src/navigation/keyframenavigator.cpp b/src/navigation/keyframenavigator.cpp index cff0f416ca..86a2e2e796 100644 --- a/src/navigation/keyframenavigator.cpp +++ b/src/navigation/keyframenavigator.cpp @@ -31,9 +31,6 @@ #include #include #include -#include - -#include namespace openspace::interaction { diff --git a/src/navigation/navigationhandler.cpp b/src/navigation/navigationhandler.cpp index 29fb6e96e3..5c898bc5f9 100644 --- a/src/navigation/navigationhandler.cpp +++ b/src/navigation/navigationhandler.cpp @@ -25,14 +25,12 @@ #include #include -#include #include #include #include #include #include #include -#include #include #include #include @@ -43,12 +41,10 @@ #include #include #include -#include #include #include #include #include -#include #include #include #include diff --git a/src/navigation/navigationhandler_lua.inl b/src/navigation/navigationhandler_lua.inl index 92c910a3e5..327a832dca 100644 --- a/src/navigation/navigationhandler_lua.inl +++ b/src/navigation/navigationhandler_lua.inl @@ -23,7 +23,6 @@ ****************************************************************************************/ #include - #include namespace { diff --git a/src/navigation/navigationstate.cpp b/src/navigation/navigationstate.cpp index 0c7ec52f5f..d29b369783 100644 --- a/src/navigation/navigationstate.cpp +++ b/src/navigation/navigationstate.cpp @@ -22,9 +22,10 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ +#include + #include #include -#include #include #include #include diff --git a/src/navigation/orbitalnavigator.cpp b/src/navigation/orbitalnavigator.cpp index 185508aed9..bc4a6457b3 100644 --- a/src/navigation/orbitalnavigator.cpp +++ b/src/navigation/orbitalnavigator.cpp @@ -22,13 +22,14 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ +#include + #include #include #include #include #include #include -#include #include #include #include @@ -38,7 +39,6 @@ #include #include #include -#include #include #include diff --git a/src/navigation/orbitalnavigator_lua.inl b/src/navigation/orbitalnavigator_lua.inl index 9e17b41a1a..69acf26899 100644 --- a/src/navigation/orbitalnavigator_lua.inl +++ b/src/navigation/orbitalnavigator_lua.inl @@ -25,8 +25,9 @@ namespace { /** -* Set minimum allowed distance to a multiplier of the interaction sphere of the focus node -*/ + * Set minimum allowed distance to a multiplier of the interaction sphere of the focus + * node. + */ [[codegen::luawrap]] void setRelativeMinDistance(float multiplier) { using namespace openspace; const SceneGraphNode* node = global::navigationHandler->anchorNode(); @@ -41,8 +42,9 @@ namespace { } /** -* Set maximum allowed distance to a multiplier of the interaction sphere of the focus node -*/ + * Set maximum allowed distance to a multiplier of the interaction sphere of the focus + * node. + */ [[codegen::luawrap]] void setRelativeMaxDistance(float multiplier) { using namespace openspace; const SceneGraphNode* node = global::navigationHandler->anchorNode(); diff --git a/src/navigation/path.cpp b/src/navigation/path.cpp index 8d4215c85e..d93a765b45 100644 --- a/src/navigation/path.cpp +++ b/src/navigation/path.cpp @@ -24,10 +24,8 @@ #include -#include #include #include -#include #include #include #include @@ -39,7 +37,6 @@ #include #include #include -#include namespace { constexpr std::string_view _loggerCat = "Path"; diff --git a/src/navigation/pathcurve.cpp b/src/navigation/pathcurve.cpp index 8aad9ea7b7..d0b97d7b76 100644 --- a/src/navigation/pathcurve.cpp +++ b/src/navigation/pathcurve.cpp @@ -25,12 +25,8 @@ #include #include -#include -#include -#include #include #include -#include #include #include diff --git a/src/navigation/pathcurves/avoidcollisioncurve.cpp b/src/navigation/pathcurves/avoidcollisioncurve.cpp index 7fc34c1013..f0eeb58512 100644 --- a/src/navigation/pathcurves/avoidcollisioncurve.cpp +++ b/src/navigation/pathcurves/avoidcollisioncurve.cpp @@ -25,15 +25,12 @@ #include #include -#include #include #include #include -#include #include #include #include -#include #include #include #include diff --git a/src/navigation/pathcurves/zoomoutoverviewcurve.cpp b/src/navigation/pathcurves/zoomoutoverviewcurve.cpp index 4948fef8b6..0a9dbbbcd4 100644 --- a/src/navigation/pathcurves/zoomoutoverviewcurve.cpp +++ b/src/navigation/pathcurves/zoomoutoverviewcurve.cpp @@ -24,10 +24,7 @@ #include -#include -#include #include -#include #include #include #include diff --git a/src/navigation/pathnavigator.cpp b/src/navigation/pathnavigator.cpp index 0146d45cac..1ed2ce0d0f 100644 --- a/src/navigation/pathnavigator.cpp +++ b/src/navigation/pathnavigator.cpp @@ -27,11 +27,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include @@ -40,13 +38,7 @@ #include #include #include -#include -#include -#include #include -#include -#include -#include #include #include "pathnavigator_lua.inl" diff --git a/src/navigation/waypoint.cpp b/src/navigation/waypoint.cpp index 1949345665..297cd39044 100644 --- a/src/navigation/waypoint.cpp +++ b/src/navigation/waypoint.cpp @@ -26,7 +26,6 @@ #include #include -#include #include #include #include diff --git a/src/network/parallelconnection.cpp b/src/network/parallelconnection.cpp index 28672ec517..da33d434a2 100644 --- a/src/network/parallelconnection.cpp +++ b/src/network/parallelconnection.cpp @@ -24,8 +24,6 @@ #include -#include -#include #include #include #include diff --git a/src/properties/list/doublelistproperty.cpp b/src/properties/list/doublelistproperty.cpp index ab61262f24..1a639e0fed 100644 --- a/src/properties/list/doublelistproperty.cpp +++ b/src/properties/list/doublelistproperty.cpp @@ -24,11 +24,8 @@ #include -#include -#include #include #include -#include namespace openspace::properties { diff --git a/src/properties/list/intlistproperty.cpp b/src/properties/list/intlistproperty.cpp index 8358ee595a..8dcf20a5ed 100644 --- a/src/properties/list/intlistproperty.cpp +++ b/src/properties/list/intlistproperty.cpp @@ -24,11 +24,8 @@ #include -#include -#include #include #include -#include namespace openspace::properties { diff --git a/src/properties/list/stringlistproperty.cpp b/src/properties/list/stringlistproperty.cpp index 63db92cc21..18e6d69352 100644 --- a/src/properties/list/stringlistproperty.cpp +++ b/src/properties/list/stringlistproperty.cpp @@ -24,11 +24,8 @@ #include -#include -#include #include #include -#include namespace openspace::properties { diff --git a/src/properties/matrix/dmat2property.cpp b/src/properties/matrix/dmat2property.cpp index 26b0cd612f..5ae02718ba 100644 --- a/src/properties/matrix/dmat2property.cpp +++ b/src/properties/matrix/dmat2property.cpp @@ -24,8 +24,7 @@ #include -#include -#include +#include #include namespace openspace::properties { diff --git a/src/properties/matrix/dmat3property.cpp b/src/properties/matrix/dmat3property.cpp index 7461e2e877..6cb874ebc4 100644 --- a/src/properties/matrix/dmat3property.cpp +++ b/src/properties/matrix/dmat3property.cpp @@ -24,8 +24,7 @@ #include -#include -#include +#include #include namespace openspace::properties { diff --git a/src/properties/matrix/dmat4property.cpp b/src/properties/matrix/dmat4property.cpp index 38ab2b7477..03a1ab3720 100644 --- a/src/properties/matrix/dmat4property.cpp +++ b/src/properties/matrix/dmat4property.cpp @@ -24,8 +24,7 @@ #include -#include -#include +#include #include namespace openspace::properties { diff --git a/src/properties/matrix/mat2property.cpp b/src/properties/matrix/mat2property.cpp index 2027986e28..ef1c476541 100644 --- a/src/properties/matrix/mat2property.cpp +++ b/src/properties/matrix/mat2property.cpp @@ -24,8 +24,7 @@ #include -#include -#include +#include #include namespace openspace::properties { diff --git a/src/properties/matrix/mat3property.cpp b/src/properties/matrix/mat3property.cpp index a0cec81b4b..11383c15e7 100644 --- a/src/properties/matrix/mat3property.cpp +++ b/src/properties/matrix/mat3property.cpp @@ -24,8 +24,7 @@ #include -#include -#include +#include #include namespace openspace::properties { diff --git a/src/properties/matrix/mat4property.cpp b/src/properties/matrix/mat4property.cpp index 91e1887f4f..63bb4ae16a 100644 --- a/src/properties/matrix/mat4property.cpp +++ b/src/properties/matrix/mat4property.cpp @@ -24,8 +24,7 @@ #include -#include -#include +#include #include namespace openspace::properties { diff --git a/src/properties/misc/selectionproperty.cpp b/src/properties/misc/selectionproperty.cpp index 1ddcdebaa8..3472bb1afe 100644 --- a/src/properties/misc/selectionproperty.cpp +++ b/src/properties/misc/selectionproperty.cpp @@ -28,12 +28,10 @@ #include #include #include -#include #include namespace { constexpr std::string_view _loggerCat = "SelectionProperty"; - constexpr std::string_view OptionsKey = "options"; } // namespace diff --git a/src/properties/property.cpp b/src/properties/property.cpp index e2583a8e21..a2f1b9c1cb 100644 --- a/src/properties/property.cpp +++ b/src/properties/property.cpp @@ -29,8 +29,6 @@ #include #include #include -#include -#include #include namespace openspace::properties { diff --git a/src/properties/propertyowner.cpp b/src/properties/propertyowner.cpp index 055219890d..b48ff5d56c 100644 --- a/src/properties/propertyowner.cpp +++ b/src/properties/propertyowner.cpp @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/src/properties/scalar/doubleproperty.cpp b/src/properties/scalar/doubleproperty.cpp index 23fc0f1783..55cfb79135 100644 --- a/src/properties/scalar/doubleproperty.cpp +++ b/src/properties/scalar/doubleproperty.cpp @@ -24,8 +24,8 @@ #include -#include -#include +#include +#include namespace openspace::properties { diff --git a/src/properties/scalar/floatproperty.cpp b/src/properties/scalar/floatproperty.cpp index ad8c79c611..ee5f51dc21 100644 --- a/src/properties/scalar/floatproperty.cpp +++ b/src/properties/scalar/floatproperty.cpp @@ -24,8 +24,8 @@ #include -#include -#include +#include +#include namespace openspace::properties { diff --git a/src/properties/scalar/intproperty.cpp b/src/properties/scalar/intproperty.cpp index a37ed0db18..1199d1e150 100644 --- a/src/properties/scalar/intproperty.cpp +++ b/src/properties/scalar/intproperty.cpp @@ -24,8 +24,8 @@ #include -#include -#include +#include +#include namespace openspace::properties { diff --git a/src/properties/scalar/longproperty.cpp b/src/properties/scalar/longproperty.cpp index a97dd0209b..2db967a6d1 100644 --- a/src/properties/scalar/longproperty.cpp +++ b/src/properties/scalar/longproperty.cpp @@ -24,8 +24,8 @@ #include -#include -#include +#include +#include namespace openspace::properties { diff --git a/src/properties/scalar/shortproperty.cpp b/src/properties/scalar/shortproperty.cpp index e226f9e560..2c370c14f9 100644 --- a/src/properties/scalar/shortproperty.cpp +++ b/src/properties/scalar/shortproperty.cpp @@ -24,8 +24,8 @@ #include -#include -#include +#include +#include namespace openspace::properties { diff --git a/src/properties/scalar/uintproperty.cpp b/src/properties/scalar/uintproperty.cpp index 08c0caf333..b8bec87104 100644 --- a/src/properties/scalar/uintproperty.cpp +++ b/src/properties/scalar/uintproperty.cpp @@ -24,8 +24,8 @@ #include -#include -#include +#include +#include namespace openspace::properties { diff --git a/src/properties/scalar/ulongproperty.cpp b/src/properties/scalar/ulongproperty.cpp index 72a53ea6ec..8f26cf3f0f 100644 --- a/src/properties/scalar/ulongproperty.cpp +++ b/src/properties/scalar/ulongproperty.cpp @@ -24,8 +24,8 @@ #include -#include -#include +#include +#include namespace openspace::properties { diff --git a/src/properties/scalar/ushortproperty.cpp b/src/properties/scalar/ushortproperty.cpp index b828dc5c39..25f4107ef4 100644 --- a/src/properties/scalar/ushortproperty.cpp +++ b/src/properties/scalar/ushortproperty.cpp @@ -24,8 +24,8 @@ #include -#include -#include +#include +#include namespace openspace::properties { diff --git a/src/properties/vector/dvec2property.cpp b/src/properties/vector/dvec2property.cpp index 9c05535f20..ef70c7ad58 100644 --- a/src/properties/vector/dvec2property.cpp +++ b/src/properties/vector/dvec2property.cpp @@ -24,8 +24,7 @@ #include -#include -#include +#include #include namespace openspace::properties { diff --git a/src/properties/vector/dvec3property.cpp b/src/properties/vector/dvec3property.cpp index 70bd5869b2..7659198529 100644 --- a/src/properties/vector/dvec3property.cpp +++ b/src/properties/vector/dvec3property.cpp @@ -24,8 +24,7 @@ #include -#include -#include +#include #include namespace openspace::properties { diff --git a/src/properties/vector/dvec4property.cpp b/src/properties/vector/dvec4property.cpp index 0043455dc2..2e97823072 100644 --- a/src/properties/vector/dvec4property.cpp +++ b/src/properties/vector/dvec4property.cpp @@ -24,8 +24,7 @@ #include -#include -#include +#include #include namespace openspace::properties { diff --git a/src/properties/vector/ivec2property.cpp b/src/properties/vector/ivec2property.cpp index ee41df1816..6c014b56aa 100644 --- a/src/properties/vector/ivec2property.cpp +++ b/src/properties/vector/ivec2property.cpp @@ -24,8 +24,7 @@ #include -#include -#include +#include #include namespace openspace::properties { diff --git a/src/properties/vector/ivec3property.cpp b/src/properties/vector/ivec3property.cpp index 768251cd9b..0acdf215e7 100644 --- a/src/properties/vector/ivec3property.cpp +++ b/src/properties/vector/ivec3property.cpp @@ -24,8 +24,7 @@ #include -#include -#include +#include #include namespace openspace::properties { diff --git a/src/properties/vector/ivec4property.cpp b/src/properties/vector/ivec4property.cpp index 785b43e1d1..ef2d6c5c75 100644 --- a/src/properties/vector/ivec4property.cpp +++ b/src/properties/vector/ivec4property.cpp @@ -24,8 +24,7 @@ #include -#include -#include +#include #include namespace openspace::properties { diff --git a/src/properties/vector/uvec2property.cpp b/src/properties/vector/uvec2property.cpp index c8210ec77a..c65f967715 100644 --- a/src/properties/vector/uvec2property.cpp +++ b/src/properties/vector/uvec2property.cpp @@ -24,8 +24,7 @@ #include -#include -#include +#include #include namespace openspace::properties { diff --git a/src/properties/vector/uvec3property.cpp b/src/properties/vector/uvec3property.cpp index 274c6f6961..02c4bc98fd 100644 --- a/src/properties/vector/uvec3property.cpp +++ b/src/properties/vector/uvec3property.cpp @@ -24,8 +24,7 @@ #include -#include -#include +#include #include namespace openspace::properties { diff --git a/src/properties/vector/uvec4property.cpp b/src/properties/vector/uvec4property.cpp index cbf4e09450..8d7f9b285a 100644 --- a/src/properties/vector/uvec4property.cpp +++ b/src/properties/vector/uvec4property.cpp @@ -24,8 +24,7 @@ #include -#include -#include +#include #include namespace openspace::properties { diff --git a/src/properties/vector/vec2property.cpp b/src/properties/vector/vec2property.cpp index a956b39509..b2dc52ec36 100644 --- a/src/properties/vector/vec2property.cpp +++ b/src/properties/vector/vec2property.cpp @@ -24,8 +24,7 @@ #include -#include -#include +#include #include namespace openspace::properties { diff --git a/src/properties/vector/vec3property.cpp b/src/properties/vector/vec3property.cpp index a14412d102..1d4ced192c 100644 --- a/src/properties/vector/vec3property.cpp +++ b/src/properties/vector/vec3property.cpp @@ -24,8 +24,7 @@ #include -#include -#include +#include #include namespace openspace::properties { diff --git a/src/properties/vector/vec4property.cpp b/src/properties/vector/vec4property.cpp index dcd1bb97b7..50716424fd 100644 --- a/src/properties/vector/vec4property.cpp +++ b/src/properties/vector/vec4property.cpp @@ -24,8 +24,7 @@ #include -#include -#include +#include #include namespace openspace::properties { diff --git a/src/rendering/colormappingcomponent.cpp b/src/rendering/colormappingcomponent.cpp index a21402dc3f..c8ce3778bf 100644 --- a/src/rendering/colormappingcomponent.cpp +++ b/src/rendering/colormappingcomponent.cpp @@ -25,8 +25,6 @@ #include #include -#include -#include #include namespace { diff --git a/src/rendering/dashboard.cpp b/src/rendering/dashboard.cpp index 2b8afbcad8..6a56df0838 100644 --- a/src/rendering/dashboard.cpp +++ b/src/rendering/dashboard.cpp @@ -26,9 +26,8 @@ #include #include -#include +#include #include -#include #include #include diff --git a/src/rendering/dashboarditem.cpp b/src/rendering/dashboarditem.cpp index f3505d67e4..8b36ab6a94 100644 --- a/src/rendering/dashboarditem.cpp +++ b/src/rendering/dashboarditem.cpp @@ -24,9 +24,7 @@ #include -#include #include -#include #include #include #include diff --git a/src/rendering/dashboardtextitem.cpp b/src/rendering/dashboardtextitem.cpp index c2eee6549a..a260987b32 100644 --- a/src/rendering/dashboardtextitem.cpp +++ b/src/rendering/dashboardtextitem.cpp @@ -25,7 +25,6 @@ #include #include -#include #include #include #include diff --git a/src/rendering/deferredcastermanager.cpp b/src/rendering/deferredcastermanager.cpp index 3297ef8699..3b282bd1d4 100644 --- a/src/rendering/deferredcastermanager.cpp +++ b/src/rendering/deferredcastermanager.cpp @@ -26,7 +26,6 @@ #include #include -#include namespace openspace { diff --git a/src/rendering/fadeable.cpp b/src/rendering/fadeable.cpp index 3f7d9508ca..71ac5bf4fe 100644 --- a/src/rendering/fadeable.cpp +++ b/src/rendering/fadeable.cpp @@ -24,10 +24,6 @@ #include -#include -#include -#include - namespace { constexpr openspace::properties::Property::PropertyInfo OpacityInfo = { "Opacity", diff --git a/src/rendering/framebufferrenderer.cpp b/src/rendering/framebufferrenderer.cpp index d5e59d6f51..52cf0de035 100644 --- a/src/rendering/framebufferrenderer.cpp +++ b/src/rendering/framebufferrenderer.cpp @@ -26,7 +26,6 @@ #include #include -#include #include #include #include @@ -44,7 +43,6 @@ #include #include #include -#include #include #include diff --git a/src/rendering/helper.cpp b/src/rendering/helper.cpp index 08c723f8dd..3dbbfb4b9e 100644 --- a/src/rendering/helper.cpp +++ b/src/rendering/helper.cpp @@ -24,7 +24,6 @@ #include -#include #include #include #include @@ -37,7 +36,7 @@ #include #include #include -#include +#include #include namespace { diff --git a/src/rendering/loadingscreen.cpp b/src/rendering/loadingscreen.cpp index 3e5429c487..0c3731b6fd 100644 --- a/src/rendering/loadingscreen.cpp +++ b/src/rendering/loadingscreen.cpp @@ -39,11 +39,8 @@ #include #include #include -#include #include -#include #include -#include #include #include #include diff --git a/src/rendering/luaconsole.cpp b/src/rendering/luaconsole.cpp index aa6686822a..1fa346f3af 100644 --- a/src/rendering/luaconsole.cpp +++ b/src/rendering/luaconsole.cpp @@ -39,7 +39,6 @@ #include #include #include -#include #include #include diff --git a/src/rendering/raycastermanager.cpp b/src/rendering/raycastermanager.cpp index f6bbe00f29..8050182e20 100644 --- a/src/rendering/raycastermanager.cpp +++ b/src/rendering/raycastermanager.cpp @@ -26,7 +26,6 @@ #include #include -#include namespace openspace { diff --git a/src/rendering/renderable.cpp b/src/rendering/renderable.cpp index e06fccdc08..54413d0c2e 100644 --- a/src/rendering/renderable.cpp +++ b/src/rendering/renderable.cpp @@ -37,7 +37,6 @@ #include #include #include -#include #include namespace { diff --git a/src/rendering/renderengine.cpp b/src/rendering/renderengine.cpp index 2cc65418a6..73752625f7 100644 --- a/src/rendering/renderengine.cpp +++ b/src/rendering/renderengine.cpp @@ -30,21 +30,15 @@ #include #include #include -#include -#include #include #include -#include #include -#include #include #include #include -#include #include #include #include -#include #include #include #include @@ -62,13 +56,10 @@ #include #include #include -#include #include -#include #include #include #include -#include #include "renderengine_lua.inl" diff --git a/src/rendering/renderengine_lua.inl b/src/rendering/renderengine_lua.inl index aeabab9664..3662b2f69b 100644 --- a/src/rendering/renderengine_lua.inl +++ b/src/rendering/renderengine_lua.inl @@ -26,7 +26,9 @@ namespace { -/// Will create a ScreenSpaceRenderable from a lua Table and add it in the RenderEngine +/** + * Will create a ScreenSpaceRenderable from a lua Table and add it in the RenderEngine. + */ [[codegen::luawrap]] void addScreenSpaceRenderable(ghoul::Dictionary screenSpace) { using namespace openspace; std::unique_ptr s = @@ -70,15 +72,17 @@ namespace { } /** -* Reset screenshot index to 0. -*/ + * Reset screenshot index to 0. + */ [[codegen::luawrap]] void resetScreenshotNumber() { using namespace openspace; global::renderEngine->resetScreenshotNumber(); } -// Extracts the DPI scaling for either the GUI window or if there is no dedicated GUI -// window, the first window. +/** + * Extracts the DPI scaling for either the GUI window or if there is no dedicated GUI + * window, the first window. + */ [[codegen::luawrap]] float dpiScaling() { return openspace::global::windowDelegate->osDpiScaling(); } diff --git a/src/rendering/screenspacerenderableframebuffer.cpp b/src/rendering/screenspacerenderableframebuffer.cpp index b08248f6b4..e1295a082a 100644 --- a/src/rendering/screenspacerenderableframebuffer.cpp +++ b/src/rendering/screenspacerenderableframebuffer.cpp @@ -27,10 +27,7 @@ #include #include #include -#include #include -#include -#include namespace { constexpr openspace::properties::Property::PropertyInfo SizeInfo = { diff --git a/src/rendering/texturecomponent.cpp b/src/rendering/texturecomponent.cpp index 6f80abd8b0..28a33bc450 100644 --- a/src/rendering/texturecomponent.cpp +++ b/src/rendering/texturecomponent.cpp @@ -25,7 +25,6 @@ #include #include -#include #include #include diff --git a/src/rendering/transferfunction.cpp b/src/rendering/transferfunction.cpp index 15b4e47f8a..a872465cf1 100644 --- a/src/rendering/transferfunction.cpp +++ b/src/rendering/transferfunction.cpp @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -197,7 +196,7 @@ void TransferFunction::setTextureFromTxt() { _texture = std::make_unique( transferFunction, - glm::size3_t(width, 1, 1), + glm::uvec3(width, 1, 1), GL_TEXTURE_1D, ghoul::opengl::Texture::Format::RGBA, GL_RGBA, diff --git a/src/scene/asset.cpp b/src/scene/asset.cpp index 476c398461..6f2f107aaa 100644 --- a/src/scene/asset.cpp +++ b/src/scene/asset.cpp @@ -29,15 +29,12 @@ #include #include #include -#include -#include #include #include #include #include #include #include -#include namespace openspace { diff --git a/src/scene/assetmanager.cpp b/src/scene/assetmanager.cpp index d9d91bb57b..7e1ffb5f9c 100644 --- a/src/scene/assetmanager.cpp +++ b/src/scene/assetmanager.cpp @@ -25,11 +25,11 @@ #include #include -#include #include #include #include #include +#include #include #include #include diff --git a/src/scene/assetmanager_lua.inl b/src/scene/assetmanager_lua.inl index 7c01343b7d..734fde442f 100644 --- a/src/scene/assetmanager_lua.inl +++ b/src/scene/assetmanager_lua.inl @@ -22,6 +22,9 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ +#include +#include + namespace { /** diff --git a/src/scene/profile.cpp b/src/scene/profile.cpp index cb7970720c..3a034ede25 100644 --- a/src/scene/profile.cpp +++ b/src/scene/profile.cpp @@ -32,16 +32,11 @@ #include #include #include -#include #include -#include #include #include #include -#include #include -#include -#include #include #include diff --git a/src/scene/rotation.cpp b/src/scene/rotation.cpp index 8ef010c9b5..73a35da329 100644 --- a/src/scene/rotation.cpp +++ b/src/scene/rotation.cpp @@ -31,9 +31,7 @@ #include #include #include -#include #include -#include namespace { // A `Rotation` object describes a specific rotation for a scene graph node, which may diff --git a/src/scene/scale.cpp b/src/scene/scale.cpp index aec649c5c6..a280e711bb 100644 --- a/src/scene/scale.cpp +++ b/src/scene/scale.cpp @@ -30,9 +30,7 @@ #include #include #include -#include #include -#include namespace { struct [[codegen::Dictionary(Scale)]] Parameters { diff --git a/src/scene/scene_lua.inl b/src/scene/scene_lua.inl index 8e3f2fed91..cc6fdcfe23 100644 --- a/src/scene/scene_lua.inl +++ b/src/scene/scene_lua.inl @@ -59,7 +59,6 @@ #include #include #include -#include namespace { diff --git a/src/scene/timeframe.cpp b/src/scene/timeframe.cpp index 5ac3683bda..5d6968a335 100644 --- a/src/scene/timeframe.cpp +++ b/src/scene/timeframe.cpp @@ -26,11 +26,7 @@ #include #include -#include #include -#include -#include -#include #include #include diff --git a/src/scene/translation.cpp b/src/scene/translation.cpp index b203161ceb..d579346ca4 100644 --- a/src/scene/translation.cpp +++ b/src/scene/translation.cpp @@ -29,9 +29,7 @@ #include #include #include -#include #include -#include namespace { struct [[codegen::Dictionary(Translation)]] Parameters { diff --git a/src/scripting/scriptengine.cpp b/src/scripting/scriptengine.cpp index 44ba6fb1f6..ed06101537 100644 --- a/src/scripting/scriptengine.cpp +++ b/src/scripting/scriptengine.cpp @@ -28,12 +28,9 @@ #include #include #include -#include #include #include #include -#include -#include #include #include #include diff --git a/src/scripting/scriptscheduler.cpp b/src/scripting/scriptscheduler.cpp index 2114910be1..7c7540250c 100644 --- a/src/scripting/scriptscheduler.cpp +++ b/src/scripting/scriptscheduler.cpp @@ -29,7 +29,6 @@ #include #include #include -#include #include "scriptscheduler_lua.inl" diff --git a/src/scripting/scriptscheduler_lua.inl b/src/scripting/scriptscheduler_lua.inl index 3f115fc6be..bdb86f64e3 100644 --- a/src/scripting/scriptscheduler_lua.inl +++ b/src/scripting/scriptscheduler_lua.inl @@ -26,7 +26,9 @@ namespace { -// Load timed scripts from a Lua script file that returns a list of scheduled scripts. +/** + * Load timed scripts from a Lua script file that returns a list of scheduled scripts. + */ [[codegen::luawrap]] void loadFile(std::string fileName) { using namespace openspace; @@ -80,12 +82,16 @@ namespace { global::scriptScheduler->loadScripts(scripts); } -// Clears all scheduled scripts. +/** + * Clears all scheduled scripts. + */ [[codegen::luawrap]] void clear(std::optional group) { openspace::global::scriptScheduler->clearSchedule(group); } -// Returns the list of all scheduled scripts +/** + * Returns the list of all scheduled scripts. + */ [[codegen::luawrap]] std::vector scheduledScripts() { using namespace openspace; diff --git a/src/scripting/systemcapabilitiesbinding.cpp b/src/scripting/systemcapabilitiesbinding.cpp index 26a3e081e2..19cc42159a 100644 --- a/src/scripting/systemcapabilitiesbinding.cpp +++ b/src/scripting/systemcapabilitiesbinding.cpp @@ -25,11 +25,6 @@ #include #include -#include -#include -#include -#include -#include #include "systemcapabilitiesbinding_lua.inl" diff --git a/src/scripting/systemcapabilitiesbinding_lua.inl b/src/scripting/systemcapabilitiesbinding_lua.inl index a075e5199b..e0c9ef7007 100644 --- a/src/scripting/systemcapabilitiesbinding_lua.inl +++ b/src/scripting/systemcapabilitiesbinding_lua.inl @@ -23,6 +23,10 @@ ****************************************************************************************/ #include +#include +#include +#include +#include namespace { diff --git a/src/util/boxgeometry.cpp b/src/util/boxgeometry.cpp index 524d29cb84..a5aa7e1824 100644 --- a/src/util/boxgeometry.cpp +++ b/src/util/boxgeometry.cpp @@ -24,9 +24,7 @@ #include -#include #include -#include namespace openspace { diff --git a/src/util/collisionhelper.cpp b/src/util/collisionhelper.cpp index b599beb4d2..a2ac5a37fe 100644 --- a/src/util/collisionhelper.cpp +++ b/src/util/collisionhelper.cpp @@ -24,8 +24,6 @@ #include -#include - namespace openspace::collision { // Source: http://paulbourke.net/geometry/circlesphere/raysphere.c diff --git a/src/util/coordinateconversion.cpp b/src/util/coordinateconversion.cpp index 8d3385ecc8..28da012539 100644 --- a/src/util/coordinateconversion.cpp +++ b/src/util/coordinateconversion.cpp @@ -26,7 +26,6 @@ #include #include -#include namespace { constexpr std::string_view _loggerCat = "Coordinateconversion"; diff --git a/src/util/distanceconversion.cpp b/src/util/distanceconversion.cpp index 67b10deba6..a8e1250138 100644 --- a/src/util/distanceconversion.cpp +++ b/src/util/distanceconversion.cpp @@ -27,8 +27,6 @@ #include #include -#include - namespace openspace { std::pair simplifyDistance(double meters, diff --git a/src/util/dynamicfilesequencedownloader.cpp b/src/util/dynamicfilesequencedownloader.cpp index ef28914783..6a3915e386 100644 --- a/src/util/dynamicfilesequencedownloader.cpp +++ b/src/util/dynamicfilesequencedownloader.cpp @@ -24,9 +24,9 @@ #include -#include #include -#include +#include +#include #include #include #include diff --git a/src/util/factorymanager.cpp b/src/util/factorymanager.cpp index 3f02d0d809..2429640535 100644 --- a/src/util/factorymanager.cpp +++ b/src/util/factorymanager.cpp @@ -36,7 +36,6 @@ #include #include #include -#include namespace openspace { diff --git a/src/util/geodetic.cpp b/src/util/geodetic.cpp index 2648285a72..56e47155c7 100644 --- a/src/util/geodetic.cpp +++ b/src/util/geodetic.cpp @@ -30,7 +30,6 @@ #include #include #include -#include namespace openspace { diff --git a/src/util/httprequest.cpp b/src/util/httprequest.cpp index b5237521f2..53a47585e4 100644 --- a/src/util/httprequest.cpp +++ b/src/util/httprequest.cpp @@ -25,9 +25,7 @@ #include #include -#include #include -#include #include #include diff --git a/src/util/json_helper.cpp b/src/util/json_helper.cpp index 11c05d8655..3476a00dda 100644 --- a/src/util/json_helper.cpp +++ b/src/util/json_helper.cpp @@ -86,7 +86,7 @@ std::string formatJsonNumber(double d) { return std::format("{}", d); } -void sortJson(nlohmann::json& json, const std::string& key) { +void sortJson(nlohmann::json& json, std::string_view key) { std::sort( json.begin(), json.end(), diff --git a/src/util/keys.cpp b/src/util/keys.cpp index a278136152..e332d5385b 100644 --- a/src/util/keys.cpp +++ b/src/util/keys.cpp @@ -25,7 +25,6 @@ #include #include -#include #include #include #include diff --git a/src/util/openspacemodule.cpp b/src/util/openspacemodule.cpp index 1d0afdb34d..1f92ae61d4 100644 --- a/src/util/openspacemodule.cpp +++ b/src/util/openspacemodule.cpp @@ -32,7 +32,6 @@ #include #include #include -#include #include namespace { diff --git a/src/util/planegeometry.cpp b/src/util/planegeometry.cpp index ce1bed4e43..bc62e1ed89 100644 --- a/src/util/planegeometry.cpp +++ b/src/util/planegeometry.cpp @@ -24,9 +24,7 @@ #include -#include #include -#include namespace openspace { @@ -59,11 +57,11 @@ void PlaneGeometry::updateSize(const glm::vec2& size) { updateGeometry(); } -void PlaneGeometry::updateSize(const float size) { +void PlaneGeometry::updateSize(float size) { updateSize(glm::vec2(size)); } -void PlaneGeometry::updateGeometry() { +void PlaneGeometry::updateGeometry() const { const glm::vec2 size = _size; struct VertexData { GLfloat x; diff --git a/src/util/spicemanager.cpp b/src/util/spicemanager.cpp index c8f1d3c3e4..8a6e50e2af 100644 --- a/src/util/spicemanager.cpp +++ b/src/util/spicemanager.cpp @@ -24,19 +24,14 @@ #include -#include #include #include -#include -#include #include #include #include #include #include #include -#include "SpiceUsr.h" -#include "SpiceZpr.h" #include "spicemanager_lua.inl" diff --git a/src/util/spicemanager_lua.inl b/src/util/spicemanager_lua.inl index 17ba0c9dfc..18d044ee42 100644 --- a/src/util/spicemanager_lua.inl +++ b/src/util/spicemanager_lua.inl @@ -23,6 +23,7 @@ ****************************************************************************************/ #include +#include #include namespace { diff --git a/src/util/syncbuffer.cpp b/src/util/syncbuffer.cpp index 3a7b3836d0..a4a012a487 100644 --- a/src/util/syncbuffer.cpp +++ b/src/util/syncbuffer.cpp @@ -111,7 +111,6 @@ void SyncBuffer::setData(std::vector data) { std::vector SyncBuffer::data() { _dataStream.resize(_encodeOffset); - return _dataStream; } diff --git a/src/util/taskloader.cpp b/src/util/taskloader.cpp index 0870045cdc..fb30a31977 100644 --- a/src/util/taskloader.cpp +++ b/src/util/taskloader.cpp @@ -26,11 +26,9 @@ #include #include -#include #include #include #include -#include #include #include #include diff --git a/src/util/time.cpp b/src/util/time.cpp index 3dcf06894f..9600ed863a 100644 --- a/src/util/time.cpp +++ b/src/util/time.cpp @@ -24,27 +24,20 @@ #include -#include #include +#include #include -#include -#include -#include -#include -#include +#include #include #include -#include #include #include -#include #include #include #include #include #include #include -#include #include #include "time_lua.inl" diff --git a/src/util/time_lua.inl b/src/util/time_lua.inl index f8a6a00904..b8c705ccc8 100644 --- a/src/util/time_lua.inl +++ b/src/util/time_lua.inl @@ -22,9 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ +#include #include -#include -#include namespace { diff --git a/src/util/timeconversion.cpp b/src/util/timeconversion.cpp index 0084a1380c..0e6c1ae35f 100644 --- a/src/util/timeconversion.cpp +++ b/src/util/timeconversion.cpp @@ -24,10 +24,6 @@ #include -#include - -#include - namespace { std::pair extractUnit(double seconds) { using namespace openspace; diff --git a/src/util/timemanager.cpp b/src/util/timemanager.cpp index e5adf07cfb..c0fa5ab847 100644 --- a/src/util/timemanager.cpp +++ b/src/util/timemanager.cpp @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include diff --git a/src/util/timerange.cpp b/src/util/timerange.cpp index a18826ee60..27d9240b60 100644 --- a/src/util/timerange.cpp +++ b/src/util/timerange.cpp @@ -27,7 +27,6 @@ #include #include #include - #include namespace { diff --git a/support/coding/codegen b/support/coding/codegen index 02b0d6ad6a..fc88af99c9 160000 --- a/support/coding/codegen +++ b/support/coding/codegen @@ -1 +1 @@ -Subproject commit 02b0d6ad6a3da07e1817f8f83aaeed01e54aa9a7 +Subproject commit fc88af99c94d344ea913de4dc4c01f82e8537ff5 diff --git a/tests/test_profile.cpp b/tests/test_profile.cpp index b8e8063224..c2a74f1ebe 100644 --- a/tests/test_profile.cpp +++ b/tests/test_profile.cpp @@ -23,18 +23,16 @@ ****************************************************************************************/ #include -#include +#include #include +#include #include #include #include #include #include #include -#include -#include -#include // clang-tidy is convinced that it is possible to use emplace_back instead of push_back // for the profiole types, but I haven't been able to convince the Visual Studio