From 096363fd06f4745ab3be210200598d78badec4c8 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Wed, 5 Feb 2025 23:22:32 +0100 Subject: [PATCH] Make constructors explicit --- .../ext/launcher/include/profile/assetedit.h | 2 +- .../launcher/include/profile/assetsdialog.h | 2 +- .../ext/launcher/include/settingsdialog.h | 2 +- .../include/sgctedit/settingswidget.h | 2 +- include/openspace/camera/camera.h | 7 +++-- .../documentation/documentationengine.h | 2 +- include/openspace/documentation/verifier.h | 26 +++++++++---------- include/openspace/engine/downloadmanager.h | 5 ++-- include/openspace/engine/syncengine.h | 2 +- .../interaction/tasks/convertrecformattask.h | 5 +++- include/openspace/mission/mission.h | 2 +- include/openspace/network/messagestructures.h | 2 +- .../openspace/network/parallelconnection.h | 2 +- include/openspace/properties/property.h | 2 +- include/openspace/rendering/dashboarditem.h | 6 ++--- .../openspace/rendering/dashboardtextitem.h | 6 ++--- include/openspace/rendering/renderable.h | 2 +- .../rendering/screenspacerenderable.h | 2 +- .../openspace/rendering/texturecomponent.h | 2 +- .../openspace/rendering/transferfunction.h | 4 +-- include/openspace/scene/lightsource.h | 2 +- include/openspace/scene/profile.h | 2 +- include/openspace/scene/scene.h | 2 +- include/openspace/scene/sceneinitializer.h | 2 +- include/openspace/scripting/scriptscheduler.h | 2 +- include/openspace/util/boxgeometry.h | 3 +-- include/openspace/util/concurrentjobmanager.h | 2 +- include/openspace/util/openspacemodule.h | 2 +- include/openspace/util/planegeometry.h | 4 +-- include/openspace/util/progressbar.h | 2 +- include/openspace/util/screenlog.h | 3 ++- include/openspace/util/syncbuffer.h | 2 +- include/openspace/util/syncdata.h | 2 +- include/openspace/util/threadpool.h | 2 +- include/openspace/util/timerange.h | 2 +- .../openspace/util/transformationmanager.h | 1 - include/openspace/util/versionchecker.h | 1 - .../rendering/renderableatmosphere.h | 2 +- modules/base/dashboard/dashboarditemangle.h | 2 +- modules/base/dashboard/dashboarditemdate.h | 2 +- .../base/dashboard/dashboarditemdistance.h | 2 +- .../base/dashboard/dashboarditemelapsedtime.h | 2 +- .../base/dashboard/dashboarditemframerate.h | 2 +- .../base/dashboard/dashboarditeminputstate.h | 2 +- modules/base/dashboard/dashboarditemmission.h | 2 +- .../dashboarditemparallelconnection.h | 2 +- .../dashboarditemsimulationincrement.h | 2 +- modules/base/dashboard/dashboarditemspacing.h | 2 +- modules/base/dashboard/dashboarditemtext.h | 2 +- .../base/dashboard/dashboarditemvelocity.h | 2 +- modules/base/lightsource/cameralightsource.h | 6 ++--- .../base/lightsource/scenegraphlightsource.h | 2 +- .../base/rendering/grids/renderableboxgrid.h | 2 +- modules/base/rendering/grids/renderablegrid.h | 2 +- .../rendering/grids/renderableradialgrid.h | 4 +-- .../rendering/grids/renderablesphericalgrid.h | 2 +- .../pointcloud/renderablepointcloud.h | 1 + .../base/rendering/renderablecartesianaxes.h | 2 +- modules/base/rendering/renderabledisc.h | 2 +- .../base/rendering/renderabledistancelabel.h | 2 +- modules/base/rendering/renderablelabel.h | 2 +- modules/base/rendering/renderablemodel.h | 2 +- modules/base/rendering/renderablenodearrow.h | 3 ++- modules/base/rendering/renderablenodeline.h | 2 +- modules/base/rendering/renderableplane.h | 2 +- .../rendering/renderableplaneimagelocal.h | 2 +- .../rendering/renderableplaneimageonline.h | 2 +- .../renderableplanetimevaryingimage.h | 2 +- modules/base/rendering/renderableprism.h | 2 +- modules/base/rendering/renderablesphere.h | 2 +- .../rendering/renderablesphereimagelocal.h | 2 +- .../rendering/renderablesphereimageonline.h | 2 +- .../rendering/renderabletimevaryingsphere.h | 2 +- modules/base/rendering/renderabletrail.h | 1 + modules/base/rendering/screenspacedashboard.h | 2 +- .../base/rendering/screenspaceframebuffer.cpp | 2 +- .../base/rendering/screenspaceframebuffer.h | 2 +- .../base/rendering/screenspaceimagelocal.h | 2 +- .../base/rendering/screenspaceimageonline.h | 2 +- modules/base/rotation/constantrotation.h | 2 +- modules/base/rotation/fixedrotation.h | 6 ++--- modules/base/rotation/multirotation.h | 3 ++- modules/base/rotation/staticrotation.h | 2 +- modules/base/rotation/timelinerotation.h | 3 ++- modules/base/scale/multiscale.h | 3 ++- modules/base/scale/nonuniformstaticscale.h | 1 + modules/base/scale/staticscale.h | 3 ++- modules/base/scale/timedependentscale.h | 3 ++- modules/base/timeframe/timeframeinterval.cpp | 12 --------- modules/base/timeframe/timeframeinterval.h | 4 +-- modules/base/timeframe/timeframeunion.h | 4 +-- modules/base/translation/multitranslation.h | 2 +- modules/base/translation/statictranslation.h | 2 +- .../base/translation/timelinetranslation.h | 2 +- modules/debugging/rendering/debugrenderer.h | 2 +- .../rendering/screenspacedebugplane.h | 2 +- .../rendering/renderableorbitdisc.h | 2 +- .../tasks/exoplanetsdatapreparationtask.h | 3 ++- .../rendering/renderablefieldlines.h | 3 +-- .../rendering/renderablefieldlinessequence.h | 2 +- .../fitsfilereader/include/fitsfilereader.h | 2 +- modules/gaia/rendering/octreeculler.h | 2 +- modules/gaia/tasks/constructoctreetask.h | 2 +- modules/gaia/tasks/readfitstask.h | 2 +- modules/gaia/tasks/readspecktask.h | 2 +- modules/galaxy/rendering/galaxyraycaster.h | 2 +- modules/galaxy/tasks/milkywayconversiontask.h | 2 +- .../tasks/milkywaypointsconversiontask.h | 2 +- .../src/dashboarditemglobelocation.h | 2 +- modules/globebrowsing/src/ellipsoid.h | 2 +- modules/globebrowsing/src/geodeticpatch.h | 2 +- .../src/geojson/geojsonproperties.h | 1 + modules/globebrowsing/src/globerotation.h | 2 +- modules/globebrowsing/src/globetranslation.h | 2 +- modules/globebrowsing/src/layergroup.h | 2 +- modules/globebrowsing/src/lrucache.h | 2 +- modules/globebrowsing/src/lruthreadpool.h | 2 +- .../src/prioritizingconcurrentjobmanager.h | 2 +- .../globebrowsing/src/rawtiledatareader.cpp | 2 +- modules/globebrowsing/src/renderableglobe.h | 4 +-- modules/globebrowsing/src/ringscomponent.h | 2 +- .../src/tileprovider/defaulttileprovider.h | 2 +- .../tileprovider/imagesequencetileprovider.h | 2 +- .../tileprovider/singleimagetileprovider.h | 2 +- .../sizereferencetileprovider.cpp | 4 +-- .../tileprovider/sizereferencetileprovider.h | 2 +- .../src/tileprovider/spoutimageprovider.h | 2 +- .../src/tileprovider/temporaltileprovider.h | 4 +-- .../src/tileprovider/texttileprovider.h | 2 +- .../src/tileprovider/tileindextileprovider.h | 2 +- .../src/tileprovider/tileproviderbydate.h | 2 +- .../src/tileprovider/tileproviderbyindex.h | 2 +- .../src/tileprovider/tileproviderbylevel.h | 2 +- modules/globebrowsing/src/timequantizer.h | 5 ++-- modules/imgui/include/guicomponent.h | 2 +- modules/imgui/include/guigibscomponent.h | 1 + .../imgui/include/guiglobebrowsingcomponent.h | 1 + modules/iswa/rendering/datacygnet.h | 2 +- modules/iswa/rendering/dataplane.h | 2 +- modules/iswa/rendering/datasphere.h | 2 +- modules/iswa/rendering/iswacygnet.h | 2 +- modules/iswa/rendering/kameleonplane.h | 2 +- modules/iswa/rendering/screenspacecygnet.h | 2 +- modules/iswa/rendering/texturecygnet.h | 2 +- modules/iswa/rendering/textureplane.h | 2 +- modules/kameleonvolume/kameleonvolumereader.h | 2 +- .../rendering/renderablekameleonvolume.h | 2 +- .../tasks/kameleondocumentationtask.h | 2 +- .../tasks/kameleonmetadatatojsontask.h | 2 +- .../tasks/kameleonvolumetorawtask.h | 2 +- .../multiresvolume/rendering/atlasmanager.h | 2 +- modules/multiresvolume/rendering/brickcover.h | 2 +- .../multiresvolume/rendering/brickmanager.h | 2 +- .../rendering/errorhistogrammanager.h | 2 +- .../rendering/localerrorhistogrammanager.h | 2 +- .../rendering/renderablemultiresvolume.h | 2 +- modules/multiresvolume/rendering/tsp.h | 2 +- modules/server/include/connectionpool.h | 2 +- modules/server/include/serverinterface.h | 2 +- .../include/topics/authorizationtopic.h | 2 +- .../skybrowser/include/renderableskytarget.h | 1 + modules/space/horizonsfile.h | 2 +- .../rendering/renderableconstellationbounds.h | 2 +- .../space/rendering/renderableeclipsecone.h | 2 +- modules/space/rendering/renderablefluxnodes.h | 2 +- .../space/rendering/renderablehabitablezone.h | 2 +- .../space/rendering/renderableorbitalkepler.h | 2 +- modules/space/rendering/renderablerings.h | 2 +- modules/space/rendering/renderablestars.h | 1 - .../space/rendering/renderabletravelspeed.h | 2 +- modules/space/rotation/spicerotation.h | 2 +- .../space/translation/horizonstranslation.h | 2 +- modules/space/translation/keplertranslation.h | 2 +- modules/space/translation/spicetranslation.h | 2 +- .../dashboard/dashboarditeminstruments.h | 2 +- .../rendering/renderablecrawlingline.h | 2 +- .../rendering/renderablefov.h | 2 +- .../rendering/renderablemodelprojection.h | 2 +- .../rendering/renderableplaneprojection.h | 2 +- .../rendering/renderableplanetprojection.h | 2 +- .../rendering/renderableshadowcylinder.h | 2 +- .../util/instrumentdecoder.h | 2 +- .../util/scannerdecoder.h | 2 +- .../util/targetdecoder.h | 2 +- modules/spout/renderableplanespout.h | 2 +- modules/spout/renderablespherespout.h | 2 +- modules/spout/screenspacespout.h | 2 +- modules/touch/include/win32_touch.h | 2 +- .../toyvolume/rendering/renderabletoyvolume.h | 2 +- .../toyvolume/rendering/toyvolumeraycaster.h | 2 +- modules/video/include/renderablevideoplane.h | 2 +- modules/video/include/renderablevideosphere.h | 2 +- modules/video/include/screenspacevideo.h | 2 +- modules/video/include/videoplayer.h | 6 ++--- modules/video/include/videotileprovider.h | 2 +- modules/volume/envelope.h | 2 +- modules/volume/lrucache.h | 2 +- modules/volume/rawvolume.h | 2 +- modules/volume/rawvolumewriter.h | 2 +- .../rendering/renderabletimevaryingvolume.h | 2 +- modules/volume/rendering/volumeclipplane.h | 3 ++- modules/volume/rendering/volumeclipplanes.h | 2 +- .../tasks/generaterawvolumefromfiletask.h | 4 ++- modules/volume/tasks/generaterawvolumetask.h | 4 ++- modules/volume/transferfunction.h | 2 +- modules/volume/transferfunctionhandler.h | 2 +- modules/volume/transferfunctionproperty.h | 2 +- modules/webbrowser/include/cefhost.h | 3 ++- .../webbrowser/include/screenspacebrowser.h | 2 +- modules/webbrowser/include/webrenderhandler.h | 2 +- modules/webgui/webguimodule.h | 1 + src/mission/missionmanager_lua.inl | 2 +- 212 files changed, 261 insertions(+), 252 deletions(-) diff --git a/apps/OpenSpace/ext/launcher/include/profile/assetedit.h b/apps/OpenSpace/ext/launcher/include/profile/assetedit.h index 7df6c18957..a41b019d48 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/assetedit.h +++ b/apps/OpenSpace/ext/launcher/include/profile/assetedit.h @@ -38,7 +38,7 @@ class QWidget; class AssetEdit final : public QDialog { Q_OBJECT public: - AssetEdit(QWidget* parent); + explicit AssetEdit(QWidget* parent); private: void createWidgets(); diff --git a/apps/OpenSpace/ext/launcher/include/profile/assetsdialog.h b/apps/OpenSpace/ext/launcher/include/profile/assetsdialog.h index 84e8da3b00..4b4cf20f48 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/assetsdialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/assetsdialog.h @@ -41,7 +41,7 @@ public: * * \param parent The parent object of this object */ - SearchProxyModel(QObject* parent = nullptr); + explicit SearchProxyModel(QObject* parent = nullptr); public slots: /** diff --git a/apps/OpenSpace/ext/launcher/include/settingsdialog.h b/apps/OpenSpace/ext/launcher/include/settingsdialog.h index d28bf3f8f6..8180b5d2d9 100644 --- a/apps/OpenSpace/ext/launcher/include/settingsdialog.h +++ b/apps/OpenSpace/ext/launcher/include/settingsdialog.h @@ -38,7 +38,7 @@ class QLineEdit; class SettingsDialog : public QDialog { Q_OBJECT public: - SettingsDialog(openspace::Settings settings, + explicit SettingsDialog(openspace::Settings settings, QWidget* parent = nullptr); signals: diff --git a/apps/OpenSpace/ext/launcher/include/sgctedit/settingswidget.h b/apps/OpenSpace/ext/launcher/include/sgctedit/settingswidget.h index 86cfaac759..1afd0bbe94 100644 --- a/apps/OpenSpace/ext/launcher/include/sgctedit/settingswidget.h +++ b/apps/OpenSpace/ext/launcher/include/sgctedit/settingswidget.h @@ -41,7 +41,7 @@ public: * Constructor for Orientation class, which manages the overall control layout * including monitorBox, multiple WindowControl columns, and additional controls. */ - SettingsWidget(sgct::quat orientation, QWidget* parent = nullptr); + explicit SettingsWidget(sgct::quat orientation, QWidget* parent = nullptr); /** * Gets the user-provided x,y,z orientation values (degrees). diff --git a/include/openspace/camera/camera.h b/include/openspace/camera/camera.h index 2c343df921..fbad73b5ed 100644 --- a/include/openspace/camera/camera.h +++ b/include/openspace/camera/camera.h @@ -154,10 +154,9 @@ public: static constexpr glm::dvec3 UpDirectionCameraSpace = glm::dvec3(0.0, 1.0, 0.0); private: - - SyncData _position = glm::dvec3(1.0, 1.0, 1.0); - SyncData _rotation = glm::dquat(glm::dvec3(1.0, 1.0, 1.0)); - SyncData _scaling = 1.f; + SyncData _position = SyncData(glm::dvec3(1.0, 1.0, 1.0)); + SyncData _rotation = SyncData(glm::dvec3(1.0, 1.0, 1.0)); + SyncData _scaling = SyncData(1.f); SceneGraphNode* _parent = nullptr; float _atmosphereDimmingFactor = 1.f; diff --git a/include/openspace/documentation/documentationengine.h b/include/openspace/documentation/documentationengine.h index 60a251a348..8cc76bf509 100644 --- a/include/openspace/documentation/documentationengine.h +++ b/include/openspace/documentation/documentationengine.h @@ -50,7 +50,7 @@ public: * * \param doc The Documentation whose identifier was previously registered */ - DuplicateDocumentationException(Documentation doc); + explicit DuplicateDocumentationException(Documentation doc); /// The offending Documentation whose identifier was previously registered Documentation documentation; diff --git a/include/openspace/documentation/verifier.h b/include/openspace/documentation/verifier.h index b7d4b03324..70d69a5c7a 100644 --- a/include/openspace/documentation/verifier.h +++ b/include/openspace/documentation/verifier.h @@ -162,7 +162,7 @@ public: */ class StringVerifier : public TemplateVerifier { public: - StringVerifier(bool mustBeNotEmpty = false); + explicit StringVerifier(bool mustBeNotEmpty = false); TestResult operator()(const ghoul::Dictionary& dictionary, const std::string& key) const override; @@ -256,7 +256,7 @@ public: * \param nEntries The exact number of entries that should be in the table. If the * value is not provided, any number (including 0) is allowed */ - TableVerifier(std::vector documentationEntries = {}, + explicit TableVerifier(std::vector documentationEntries = {}, std::optional nEntries = std::nullopt); /** @@ -293,7 +293,7 @@ public: * * \param elementDocumentation The documentation for each string in the list */ - StringListVerifier(std::string elementDocumentation = ""); + explicit StringListVerifier(std::string elementDocumentation = ""); std::string type() const override; }; @@ -308,7 +308,7 @@ public: * * \param elementDocumentation The documentation for each string in the list */ - IntListVerifier(std::string elementDocumentation = ""); + explicit IntListVerifier(std::string elementDocumentation = ""); std::string type() const override; }; @@ -367,7 +367,7 @@ public: template class Vector2ListVerifier : public TableVerifier { public: - Vector2ListVerifier(std::string elementDocumentation = "") + explicit Vector2ListVerifier(std::string elementDocumentation = "") : TableVerifier({ { "*", @@ -391,7 +391,7 @@ public: template class Vector3ListVerifier : public TableVerifier { public: - Vector3ListVerifier(std::string elementDocumentation = "") + explicit Vector3ListVerifier(std::string elementDocumentation = "") : TableVerifier({ { "*", @@ -415,7 +415,7 @@ public: template class Vector4ListVerifier : public TableVerifier { public: - Vector4ListVerifier(std::string elementDocumentation = "") + explicit Vector4ListVerifier(std::string elementDocumentation = "") : TableVerifier({ { "*", @@ -546,7 +546,7 @@ public: * \param value The value against which the tested value is compared using the * `Operator` */ - OperatorVerifier(typename T::Type value); + explicit OperatorVerifier(typename T::Type value); /** * First checks whether the \p dictionary contains the passed \p key and whether the @@ -700,7 +700,7 @@ public: * * \param values The list of values against which the incoming value is tested */ - InListVerifier(std::vector values); + explicit InListVerifier(std::vector values); /** * Tests whether the \p key exists in the \p dictionary, whether it has the correct @@ -742,7 +742,7 @@ public: * * \param values The list of values against which the incoming value is tested */ - NotInListVerifier(std::vector values); + explicit NotInListVerifier(std::vector values); /** * Tests whether the \p key exists in the \p dictionary, whether it has the correct @@ -897,7 +897,7 @@ public: * * \pre annotation must not be empty */ - AnnotationVerifier(std::string annotation); + explicit AnnotationVerifier(std::string annotation); std::string documentation() const override; @@ -923,7 +923,7 @@ public: * * \param identifier The identifier of the Documentation that this Verifier references */ - ReferencingVerifier(std::string identifier); + explicit ReferencingVerifier(std::string identifier); /** * Checks whether the \p key in the \p dictionary exists and is of type Table (similar @@ -975,7 +975,7 @@ public: * the entire ownership model of the documentation/verifiers. For now it was * necessary to make the codegen work in all cases without complications there */ - OrVerifier(const std::vector>>& values); /** diff --git a/include/openspace/engine/downloadmanager.h b/include/openspace/engine/downloadmanager.h index 952c8a28eb..5f49f0a07d 100644 --- a/include/openspace/engine/downloadmanager.h +++ b/include/openspace/engine/downloadmanager.h @@ -44,7 +44,7 @@ public: // Since the FileFuture object will be used from multiple threads, we have to be // careful about the access pattern, that is, no values should be read and written // by both the DownloadManager and the outside threads. - FileFuture(std::filesystem::path file); + explicit FileFuture(std::filesystem::path file); // Values that are written by the DownloadManager to be consumed by others long long currentSize = -1; @@ -89,7 +89,8 @@ public: return f.wait_for(std::chrono::seconds(0)) == std::future_status::ready; } - DownloadManager(UseMultipleThreads useMultipleThreads = UseMultipleThreads::Yes); + explicit DownloadManager( + UseMultipleThreads useMultipleThreads = UseMultipleThreads::Yes); //downloadFile // url - specifies the target of the download diff --git a/include/openspace/engine/syncengine.h b/include/openspace/engine/syncengine.h index 9274130233..d4516bfb43 100644 --- a/include/openspace/engine/syncengine.h +++ b/include/openspace/engine/syncengine.h @@ -48,7 +48,7 @@ public: * * \pre syncBufferSize must be bigger than 0 */ - SyncEngine(unsigned int syncBufferSize); + explicit SyncEngine(unsigned int syncBufferSize); /** * Encodes all added Syncables in the injected `SyncBuffer`. This method is only diff --git a/include/openspace/interaction/tasks/convertrecformattask.h b/include/openspace/interaction/tasks/convertrecformattask.h index 385e73f9cd..2f8ae62366 100644 --- a/include/openspace/interaction/tasks/convertrecformattask.h +++ b/include/openspace/interaction/tasks/convertrecformattask.h @@ -40,10 +40,13 @@ public: ToAscii = 0, ToBinary }; - ConvertRecFormatTask(const ghoul::Dictionary& dictionary); + + explicit ConvertRecFormatTask(const ghoul::Dictionary& dictionary); ~ConvertRecFormatTask() override = default; + std::string description() override; void perform(const Task::ProgressCallback& progressCallback) override; + static documentation::Documentation documentation(); private: diff --git a/include/openspace/mission/mission.h b/include/openspace/mission/mission.h index f959cbc913..edb59e93c0 100644 --- a/include/openspace/mission/mission.h +++ b/include/openspace/mission/mission.h @@ -68,7 +68,7 @@ public: * time range * \throw RuntimeError If neither subphases or a time range is specified */ - MissionPhase(const ghoul::Dictionary& dictionary); + explicit MissionPhase(const ghoul::Dictionary& dictionary); /** * Returns the name of the MissionPhase. diff --git a/include/openspace/network/messagestructures.h b/include/openspace/network/messagestructures.h index 045b9f2b1f..408114e528 100644 --- a/include/openspace/network/messagestructures.h +++ b/include/openspace/network/messagestructures.h @@ -47,7 +47,7 @@ enum class Type : uint32_t { struct CameraKeyframe { CameraKeyframe() = default; - CameraKeyframe(const std::vector& buffer) { + explicit CameraKeyframe(const std::vector& buffer) { deserialize(buffer); } CameraKeyframe(glm::dvec3 pos, glm::dquat rot, std::string focusNode, diff --git a/include/openspace/network/parallelconnection.h b/include/openspace/network/parallelconnection.h index 7ccdda42f7..14637306b0 100644 --- a/include/openspace/network/parallelconnection.h +++ b/include/openspace/network/parallelconnection.h @@ -75,7 +75,7 @@ public: bool shouldLogError; }; - ParallelConnection(std::unique_ptr socket); + explicit ParallelConnection(std::unique_ptr socket); bool isConnectedOrConnecting() const; void sendDataMessage(const ParallelConnection::DataMessage& dataMessage); diff --git a/include/openspace/properties/property.h b/include/openspace/properties/property.h index 78f18882ab..24dcd5397d 100644 --- a/include/openspace/properties/property.h +++ b/include/openspace/properties/property.h @@ -144,7 +144,7 @@ public: * \pre \p info.identifier must not be empty * \pre \p info.guiName must not be empty */ - Property(PropertyInfo info); + explicit Property(PropertyInfo info); /** * The destructor taking care of deallocating all unused memory. This method will not diff --git a/include/openspace/rendering/dashboarditem.h b/include/openspace/rendering/dashboarditem.h index 9c0396dbde..cfa71235b5 100644 --- a/include/openspace/rendering/dashboarditem.h +++ b/include/openspace/rendering/dashboarditem.h @@ -38,19 +38,19 @@ namespace documentation { struct Documentation; } class DashboardItem : public properties::PropertyOwner { public: - static documentation::Documentation Documentation(); - static std::unique_ptr createFromDictionary( const ghoul::Dictionary& dictionary ); - DashboardItem(const ghoul::Dictionary& dictionary); + explicit DashboardItem(const ghoul::Dictionary& dictionary); bool isEnabled() const; virtual void render(glm::vec2& penPosition) = 0; virtual glm::vec2 size() const = 0; + static documentation::Documentation Documentation(); + protected: properties::BoolProperty _enabled; }; diff --git a/include/openspace/rendering/dashboardtextitem.h b/include/openspace/rendering/dashboardtextitem.h index 4e1f54d5d7..e0fdda6b45 100644 --- a/include/openspace/rendering/dashboardtextitem.h +++ b/include/openspace/rendering/dashboardtextitem.h @@ -39,11 +39,11 @@ namespace documentation { struct Documentation; } class DashboardTextItem : public DashboardItem { public: - static documentation::Documentation Documentation(); - - DashboardTextItem(const ghoul::Dictionary& dictionary, float fontSize = 10.f, + explicit DashboardTextItem(const ghoul::Dictionary& dictionary, float fontSize = 10.f, const std::string& fontName = "Mono"); + static documentation::Documentation Documentation(); + protected: properties::StringProperty _fontName; properties::FloatProperty _fontSize; diff --git a/include/openspace/rendering/renderable.h b/include/openspace/rendering/renderable.h index 3d136f4b02..e74db4cc04 100644 --- a/include/openspace/rendering/renderable.h +++ b/include/openspace/rendering/renderable.h @@ -73,7 +73,7 @@ public: static ghoul::mm_unique_ptr createFromDictionary( const ghoul::Dictionary& dictionary); - Renderable(const ghoul::Dictionary& dictionary, + explicit Renderable(const ghoul::Dictionary& dictionary, RenderableSettings settings = RenderableSettings()); virtual ~Renderable() override = default; diff --git a/include/openspace/rendering/screenspacerenderable.h b/include/openspace/rendering/screenspacerenderable.h index fbd6105dcb..7f8a01b4a5 100644 --- a/include/openspace/rendering/screenspacerenderable.h +++ b/include/openspace/rendering/screenspacerenderable.h @@ -58,7 +58,7 @@ public: static constexpr std::string_view KeyName = "Name"; static constexpr std::string_view KeyIdentifier = "Identifier"; - ScreenSpaceRenderable(const ghoul::Dictionary& dictionary); + explicit ScreenSpaceRenderable(const ghoul::Dictionary& dictionary); virtual ~ScreenSpaceRenderable() override; struct RenderData { diff --git a/include/openspace/rendering/texturecomponent.h b/include/openspace/rendering/texturecomponent.h index 47a8a19561..5b623d8907 100644 --- a/include/openspace/rendering/texturecomponent.h +++ b/include/openspace/rendering/texturecomponent.h @@ -36,7 +36,7 @@ namespace openspace { class TextureComponent { public: // nDimensions must be 1, 2, 3 - TextureComponent(int nDimensions); + explicit TextureComponent(int nDimensions); const ghoul::opengl::Texture* texture() const; ghoul::opengl::Texture* texture(); diff --git a/include/openspace/rendering/transferfunction.h b/include/openspace/rendering/transferfunction.h index c1886b9e7c..6f672a0548 100644 --- a/include/openspace/rendering/transferfunction.h +++ b/include/openspace/rendering/transferfunction.h @@ -39,8 +39,8 @@ namespace openspace { class TransferFunction { public: using TfChangedCallback = std::function; - - TransferFunction(const std::filesystem::path& filepath, + + explicit TransferFunction(const std::filesystem::path& filepath, TfChangedCallback tfChangedCallback = TfChangedCallback()); ~TransferFunction(); diff --git a/include/openspace/scene/lightsource.h b/include/openspace/scene/lightsource.h index 566725a5d0..ece1fd50ba 100644 --- a/include/openspace/scene/lightsource.h +++ b/include/openspace/scene/lightsource.h @@ -46,7 +46,7 @@ public: const ghoul::Dictionary& dictionary); LightSource(); - LightSource(const ghoul::Dictionary& dictionary); + explicit LightSource(const ghoul::Dictionary& dictionary); ~LightSource() override = default; virtual glm::vec3 directionViewSpace(const RenderData& renderData) const = 0; diff --git a/include/openspace/scene/profile.h b/include/openspace/scene/profile.h index 1cdda4144a..2c1a2e38f7 100644 --- a/include/openspace/scene/profile.h +++ b/include/openspace/scene/profile.h @@ -46,7 +46,7 @@ public: struct ParsingError : public ghoul::RuntimeError { enum class Severity { Info, Warning, Error }; - explicit ParsingError(Severity severity_, std::string msg); + ParsingError(Severity severity_, std::string msg); Severity severity; }; diff --git a/include/openspace/scene/scene.h b/include/openspace/scene/scene.h index b18ff8d595..2365d9f819 100644 --- a/include/openspace/scene/scene.h +++ b/include/openspace/scene/scene.h @@ -84,7 +84,7 @@ public: std::string time; }; - Scene(std::unique_ptr initializer); + explicit Scene(std::unique_ptr initializer); virtual ~Scene() override; /** diff --git a/include/openspace/scene/sceneinitializer.h b/include/openspace/scene/sceneinitializer.h index 7004d9f060..ead759ead9 100644 --- a/include/openspace/scene/sceneinitializer.h +++ b/include/openspace/scene/sceneinitializer.h @@ -53,7 +53,7 @@ private: class MultiThreadedSceneInitializer final : public SceneInitializer { public: - MultiThreadedSceneInitializer(unsigned int nThreads); + explicit MultiThreadedSceneInitializer(unsigned int nThreads); void initializeNode(SceneGraphNode* node) override; std::vector takeInitializedNodes() override; diff --git a/include/openspace/scripting/scriptscheduler.h b/include/openspace/scripting/scriptscheduler.h index 58e6fafb01..68189c7952 100644 --- a/include/openspace/scripting/scriptscheduler.h +++ b/include/openspace/scripting/scriptscheduler.h @@ -54,7 +54,7 @@ public: struct ScheduledScript { ScheduledScript() = default; - ScheduledScript(const ghoul::Dictionary& dict); + explicit ScheduledScript(const ghoul::Dictionary& dict); double time = -std::numeric_limits::max(); std::string forwardScript; diff --git a/include/openspace/util/boxgeometry.h b/include/openspace/util/boxgeometry.h index c06f7ef6ee..dc7d28ed02 100644 --- a/include/openspace/util/boxgeometry.h +++ b/include/openspace/util/boxgeometry.h @@ -32,8 +32,7 @@ namespace openspace { class BoxGeometry { public: - // initializers - BoxGeometry(glm::vec3 size); + explicit BoxGeometry(glm::vec3 size); ~BoxGeometry(); bool initialize(); diff --git a/include/openspace/util/concurrentjobmanager.h b/include/openspace/util/concurrentjobmanager.h index 206783685f..46d0a37f9e 100644 --- a/include/openspace/util/concurrentjobmanager.h +++ b/include/openspace/util/concurrentjobmanager.h @@ -41,7 +41,7 @@ template struct Job; template class ConcurrentJobManager { public: - ConcurrentJobManager(ThreadPool pool); + explicit ConcurrentJobManager(ThreadPool pool); void enqueueJob(std::shared_ptr> job); diff --git a/include/openspace/util/openspacemodule.h b/include/openspace/util/openspacemodule.h index 92f204ccc2..4ff6d55c43 100644 --- a/include/openspace/util/openspacemodule.h +++ b/include/openspace/util/openspacemodule.h @@ -55,7 +55,7 @@ public: * * \pre \p name must not be empty */ - OpenSpaceModule(std::string name); + explicit OpenSpaceModule(std::string name); /// Default destructor virtual ~OpenSpaceModule() override = default; diff --git a/include/openspace/util/planegeometry.h b/include/openspace/util/planegeometry.h index 45f25d0f97..6d34a12dc6 100644 --- a/include/openspace/util/planegeometry.h +++ b/include/openspace/util/planegeometry.h @@ -32,8 +32,8 @@ namespace openspace { class PlaneGeometry { public: - PlaneGeometry(glm::vec2 size); - PlaneGeometry(float size); + explicit PlaneGeometry(glm::vec2 size); + explicit PlaneGeometry(float size); ~PlaneGeometry(); diff --git a/include/openspace/util/progressbar.h b/include/openspace/util/progressbar.h index 68a103eec7..c8ab0a467d 100644 --- a/include/openspace/util/progressbar.h +++ b/include/openspace/util/progressbar.h @@ -31,7 +31,7 @@ namespace openspace { class ProgressBar { public: - ProgressBar(int end, int width = 70, std::ostream& stream = std::cout); + explicit ProgressBar(int end, int width = 70, std::ostream& stream = std::cout); ~ProgressBar(); ProgressBar& operator=(const ProgressBar& rhs) = delete; diff --git a/include/openspace/util/screenlog.h b/include/openspace/util/screenlog.h index c2c9daefbd..97bb13f79e 100644 --- a/include/openspace/util/screenlog.h +++ b/include/openspace/util/screenlog.h @@ -77,7 +77,8 @@ public: * \param logLevel The minimum ghoul::logging::LogLevel that messages must * have in order to be stored in the ScreenLog */ - ScreenLog(std::chrono::seconds timeToLive, LogLevel logLevel = LogLevel::Info); + explicit ScreenLog(std::chrono::seconds timeToLive, + LogLevel logLevel = LogLevel::Info); /** * Destructor diff --git a/include/openspace/util/syncbuffer.h b/include/openspace/util/syncbuffer.h index 4c2dd3c239..a486eefabc 100644 --- a/include/openspace/util/syncbuffer.h +++ b/include/openspace/util/syncbuffer.h @@ -34,7 +34,7 @@ namespace openspace { class SyncBuffer { public: - SyncBuffer(size_t n); + explicit SyncBuffer(size_t n); ~SyncBuffer() = default; diff --git a/include/openspace/util/syncdata.h b/include/openspace/util/syncdata.h index d96744b0d4..141f28e161 100644 --- a/include/openspace/util/syncdata.h +++ b/include/openspace/util/syncdata.h @@ -46,7 +46,7 @@ template class SyncData : public Syncable { public: SyncData() = default; - SyncData(const T& val); + explicit SyncData(const T& val); SyncData(const SyncData& o); /** diff --git a/include/openspace/util/threadpool.h b/include/openspace/util/threadpool.h index ba1359d166..8bb74b9e21 100644 --- a/include/openspace/util/threadpool.h +++ b/include/openspace/util/threadpool.h @@ -49,7 +49,7 @@ private: class ThreadPool { public: - ThreadPool(size_t numThreads); + explicit ThreadPool(size_t numThreads); ThreadPool(const ThreadPool& toCopy); ~ThreadPool(); diff --git a/include/openspace/util/timerange.h b/include/openspace/util/timerange.h index 0824c409db..a742f17e2e 100644 --- a/include/openspace/util/timerange.h +++ b/include/openspace/util/timerange.h @@ -48,7 +48,7 @@ struct TimeRange { /** * Throws exception if unable to parse the provided \class ghoul::Dictionary. */ - TimeRange(const ghoul::Dictionary& dict); + explicit TimeRange(const ghoul::Dictionary& dict); /** * \return `true` if \p timeRange could be initialized from the dictionary, `false` diff --git a/include/openspace/util/transformationmanager.h b/include/openspace/util/transformationmanager.h index 63350790cc..dc66cbffb1 100644 --- a/include/openspace/util/transformationmanager.h +++ b/include/openspace/util/transformationmanager.h @@ -44,7 +44,6 @@ public: static bool isInitialized(); static TransformationManager& ref(); - glm::dmat3 frameTransformationMatrix(const std::string& from, const std::string& to, double ephemerisTime) const; diff --git a/include/openspace/util/versionchecker.h b/include/openspace/util/versionchecker.h index 5d16b8f0b4..e24cd8c142 100644 --- a/include/openspace/util/versionchecker.h +++ b/include/openspace/util/versionchecker.h @@ -32,7 +32,6 @@ namespace openspace { - class VersionChecker { public: struct SemanticVersion { diff --git a/modules/atmosphere/rendering/renderableatmosphere.h b/modules/atmosphere/rendering/renderableatmosphere.h index 5d1c78c892..f6a9b36b68 100644 --- a/modules/atmosphere/rendering/renderableatmosphere.h +++ b/modules/atmosphere/rendering/renderableatmosphere.h @@ -65,7 +65,7 @@ namespace planetgeometry { class PlanetGeometry; } class RenderableAtmosphere : public Renderable { public: - RenderableAtmosphere(const ghoul::Dictionary& dictionary); + explicit RenderableAtmosphere(const ghoul::Dictionary& dictionary); void initializeGL() override; void deinitializeGL() override; diff --git a/modules/base/dashboard/dashboarditemangle.h b/modules/base/dashboard/dashboarditemangle.h index 6dbde0bb23..f2f6f823d3 100644 --- a/modules/base/dashboard/dashboarditemangle.h +++ b/modules/base/dashboard/dashboarditemangle.h @@ -39,7 +39,7 @@ namespace documentation { struct Documentation; } class DashboardItemAngle : public DashboardTextItem { public: - DashboardItemAngle(const ghoul::Dictionary& dictionary); + explicit DashboardItemAngle(const ghoul::Dictionary& dictionary); ~DashboardItemAngle() override = default; void render(glm::vec2& penPosition) override; diff --git a/modules/base/dashboard/dashboarditemdate.h b/modules/base/dashboard/dashboarditemdate.h index b06221dcad..bdccb30321 100644 --- a/modules/base/dashboard/dashboarditemdate.h +++ b/modules/base/dashboard/dashboarditemdate.h @@ -35,7 +35,7 @@ namespace documentation { struct Documentation; } class DashboardItemDate : public DashboardTextItem { public: - DashboardItemDate(const ghoul::Dictionary& dictionary); + explicit DashboardItemDate(const ghoul::Dictionary& dictionary); ~DashboardItemDate() override = default; void render(glm::vec2& penPosition) override; diff --git a/modules/base/dashboard/dashboarditemdistance.h b/modules/base/dashboard/dashboarditemdistance.h index 1693cd8350..7b79e84a2c 100644 --- a/modules/base/dashboard/dashboarditemdistance.h +++ b/modules/base/dashboard/dashboarditemdistance.h @@ -40,7 +40,7 @@ namespace documentation { struct Documentation; } class DashboardItemDistance : public DashboardTextItem { public: - DashboardItemDistance(const ghoul::Dictionary& dictionary); + explicit DashboardItemDistance(const ghoul::Dictionary& dictionary); ~DashboardItemDistance() override = default; void render(glm::vec2& penPosition) override; diff --git a/modules/base/dashboard/dashboarditemelapsedtime.h b/modules/base/dashboard/dashboarditemelapsedtime.h index c250b2a5e2..5a403b9907 100644 --- a/modules/base/dashboard/dashboarditemelapsedtime.h +++ b/modules/base/dashboard/dashboarditemelapsedtime.h @@ -37,7 +37,7 @@ namespace documentation { struct Documentation; } class DashboardItemElapsedTime : public DashboardTextItem { public: - DashboardItemElapsedTime(const ghoul::Dictionary& dictionary); + explicit DashboardItemElapsedTime(const ghoul::Dictionary& dictionary); ~DashboardItemElapsedTime() override = default; void render(glm::vec2& penPosition) override; diff --git a/modules/base/dashboard/dashboarditemframerate.h b/modules/base/dashboard/dashboarditemframerate.h index 16bbb352b6..96fe7ef51b 100644 --- a/modules/base/dashboard/dashboarditemframerate.h +++ b/modules/base/dashboard/dashboarditemframerate.h @@ -38,7 +38,7 @@ namespace documentation { struct Documentation; } class DashboardItemFramerate : public DashboardTextItem { public: - DashboardItemFramerate(const ghoul::Dictionary& dictionary); + explicit DashboardItemFramerate(const ghoul::Dictionary& dictionary); void render(glm::vec2& penPosition) override; glm::vec2 size() const override; diff --git a/modules/base/dashboard/dashboarditeminputstate.h b/modules/base/dashboard/dashboarditeminputstate.h index bc3b3018ba..3626983407 100644 --- a/modules/base/dashboard/dashboarditeminputstate.h +++ b/modules/base/dashboard/dashboarditeminputstate.h @@ -36,7 +36,7 @@ namespace documentation { struct Documentation; } class DashboardItemInputState : public DashboardTextItem { public: - DashboardItemInputState(const ghoul::Dictionary& dictionary); + explicit DashboardItemInputState(const ghoul::Dictionary& dictionary); ~DashboardItemInputState() override = default; void render(glm::vec2& penPosition) override; diff --git a/modules/base/dashboard/dashboarditemmission.h b/modules/base/dashboard/dashboarditemmission.h index efec10730f..e898f6dfd2 100644 --- a/modules/base/dashboard/dashboarditemmission.h +++ b/modules/base/dashboard/dashboarditemmission.h @@ -33,7 +33,7 @@ namespace documentation { struct Documentation; } class DashboardItemMission : public DashboardTextItem { public: - DashboardItemMission(const ghoul::Dictionary& dictionary); + explicit DashboardItemMission(const ghoul::Dictionary& dictionary); ~DashboardItemMission() override = default; void render(glm::vec2& penPosition) override; diff --git a/modules/base/dashboard/dashboarditemparallelconnection.h b/modules/base/dashboard/dashboarditemparallelconnection.h index 81662f8952..aba4179322 100644 --- a/modules/base/dashboard/dashboarditemparallelconnection.h +++ b/modules/base/dashboard/dashboarditemparallelconnection.h @@ -33,7 +33,7 @@ namespace documentation { struct Documentation; } class DashboardItemParallelConnection : public DashboardTextItem { public: - DashboardItemParallelConnection(const ghoul::Dictionary& dictionary); + explicit DashboardItemParallelConnection(const ghoul::Dictionary& dictionary); ~DashboardItemParallelConnection() override = default; void render(glm::vec2& penPosition) override; diff --git a/modules/base/dashboard/dashboarditemsimulationincrement.h b/modules/base/dashboard/dashboarditemsimulationincrement.h index c15a374c3b..d15d62e05e 100644 --- a/modules/base/dashboard/dashboarditemsimulationincrement.h +++ b/modules/base/dashboard/dashboarditemsimulationincrement.h @@ -37,7 +37,7 @@ namespace documentation { struct Documentation; } class DashboardItemSimulationIncrement : public DashboardTextItem { public: - DashboardItemSimulationIncrement(const ghoul::Dictionary& dictionary); + explicit DashboardItemSimulationIncrement(const ghoul::Dictionary& dictionary); ~DashboardItemSimulationIncrement() override = default; void render(glm::vec2& penPosition) override; diff --git a/modules/base/dashboard/dashboarditemspacing.h b/modules/base/dashboard/dashboarditemspacing.h index 40d6f97378..4287e8d2ff 100644 --- a/modules/base/dashboard/dashboarditemspacing.h +++ b/modules/base/dashboard/dashboarditemspacing.h @@ -35,7 +35,7 @@ namespace documentation { struct Documentation; } class DashboardItemSpacing : public DashboardItem { public: - DashboardItemSpacing(const ghoul::Dictionary& dictionary); + explicit DashboardItemSpacing(const ghoul::Dictionary& dictionary); ~DashboardItemSpacing() override = default; void render(glm::vec2& penPosition) override; diff --git a/modules/base/dashboard/dashboarditemtext.h b/modules/base/dashboard/dashboarditemtext.h index a517270709..5f6646612c 100644 --- a/modules/base/dashboard/dashboarditemtext.h +++ b/modules/base/dashboard/dashboarditemtext.h @@ -35,7 +35,7 @@ namespace documentation { struct Documentation; } class DashboardItemText : public DashboardTextItem { public: - DashboardItemText(const ghoul::Dictionary& dictionary); + explicit DashboardItemText(const ghoul::Dictionary& dictionary); ~DashboardItemText() override = default; void render(glm::vec2& penPosition) override; diff --git a/modules/base/dashboard/dashboarditemvelocity.h b/modules/base/dashboard/dashboarditemvelocity.h index 04a131e8b6..ef49d45825 100644 --- a/modules/base/dashboard/dashboarditemvelocity.h +++ b/modules/base/dashboard/dashboarditemvelocity.h @@ -39,7 +39,7 @@ namespace documentation { struct Documentation; } class DashboardItemVelocity : public DashboardTextItem { public: - DashboardItemVelocity(const ghoul::Dictionary& dictionary); + explicit DashboardItemVelocity(const ghoul::Dictionary& dictionary); ~DashboardItemVelocity() override = default; void render(glm::vec2& penPosition) override; diff --git a/modules/base/lightsource/cameralightsource.h b/modules/base/lightsource/cameralightsource.h index 2004d0c74b..f3c4b5e5af 100644 --- a/modules/base/lightsource/cameralightsource.h +++ b/modules/base/lightsource/cameralightsource.h @@ -37,13 +37,13 @@ namespace documentation { struct Documentation; } class CameraLightSource : public LightSource { public: CameraLightSource(); - CameraLightSource(const ghoul::Dictionary& dictionary); - - static documentation::Documentation Documentation(); + explicit CameraLightSource(const ghoul::Dictionary& dictionary); glm::vec3 directionViewSpace(const RenderData& renderData) const override; float intensity() const override; + static documentation::Documentation Documentation(); + private: properties::FloatProperty _intensity; }; diff --git a/modules/base/lightsource/scenegraphlightsource.h b/modules/base/lightsource/scenegraphlightsource.h index 1620021b9a..caea185d75 100644 --- a/modules/base/lightsource/scenegraphlightsource.h +++ b/modules/base/lightsource/scenegraphlightsource.h @@ -37,7 +37,7 @@ namespace documentation { struct Documentation; } class SceneGraphLightSource : public LightSource { public: SceneGraphLightSource(); - SceneGraphLightSource(const ghoul::Dictionary& dictionary); + explicit SceneGraphLightSource(const ghoul::Dictionary& dictionary); static documentation::Documentation Documentation(); diff --git a/modules/base/rendering/grids/renderableboxgrid.h b/modules/base/rendering/grids/renderableboxgrid.h index ef3b0e161b..12b9ee7ac1 100644 --- a/modules/base/rendering/grids/renderableboxgrid.h +++ b/modules/base/rendering/grids/renderableboxgrid.h @@ -41,7 +41,7 @@ namespace openspace { class RenderableBoxGrid : public Renderable { public: - RenderableBoxGrid(const ghoul::Dictionary& dictionary); + explicit RenderableBoxGrid(const ghoul::Dictionary& dictionary); void initializeGL() override; void deinitializeGL() override; diff --git a/modules/base/rendering/grids/renderablegrid.h b/modules/base/rendering/grids/renderablegrid.h index 4423482168..046165932d 100644 --- a/modules/base/rendering/grids/renderablegrid.h +++ b/modules/base/rendering/grids/renderablegrid.h @@ -42,7 +42,7 @@ namespace openspace { class RenderableGrid : public Renderable { public: - RenderableGrid(const ghoul::Dictionary& dictionary); + explicit RenderableGrid(const ghoul::Dictionary& dictionary); void initialize() override; void initializeGL() override; diff --git a/modules/base/rendering/grids/renderableradialgrid.h b/modules/base/rendering/grids/renderableradialgrid.h index f22a65885a..cc9a8db7bf 100644 --- a/modules/base/rendering/grids/renderableradialgrid.h +++ b/modules/base/rendering/grids/renderableradialgrid.h @@ -44,7 +44,7 @@ namespace openspace { class RenderableRadialGrid : public Renderable { public: - RenderableRadialGrid(const ghoul::Dictionary& dictionary); + explicit RenderableRadialGrid(const ghoul::Dictionary& dictionary); ~RenderableRadialGrid() override = default; void initialize() override; @@ -60,7 +60,7 @@ public: protected: struct GeometryData { - GeometryData(GLenum renderMode); + explicit GeometryData(GLenum renderMode); GeometryData(GeometryData&& other) noexcept; GeometryData& operator=(const GeometryData& other) = delete; GeometryData& operator=(GeometryData&& other) noexcept; diff --git a/modules/base/rendering/grids/renderablesphericalgrid.h b/modules/base/rendering/grids/renderablesphericalgrid.h index 8901638fa7..07cc8e6caa 100644 --- a/modules/base/rendering/grids/renderablesphericalgrid.h +++ b/modules/base/rendering/grids/renderablesphericalgrid.h @@ -41,7 +41,7 @@ namespace documentation { struct Documentation; } class RenderableSphericalGrid : public Renderable { public: - RenderableSphericalGrid(const ghoul::Dictionary& dictionary); + explicit RenderableSphericalGrid(const ghoul::Dictionary& dictionary); ~RenderableSphericalGrid() override = default; void initialize() override; diff --git a/modules/base/rendering/pointcloud/renderablepointcloud.h b/modules/base/rendering/pointcloud/renderablepointcloud.h index 5ad1c7182e..0942886b43 100644 --- a/modules/base/rendering/pointcloud/renderablepointcloud.h +++ b/modules/base/rendering/pointcloud/renderablepointcloud.h @@ -214,6 +214,7 @@ protected: struct Texture : properties::PropertyOwner { Texture(); + properties::BoolProperty enabled; properties::BoolProperty allowCompression; properties::BoolProperty useAlphaChannel; diff --git a/modules/base/rendering/renderablecartesianaxes.h b/modules/base/rendering/renderablecartesianaxes.h index fc231d4f53..85595c5591 100644 --- a/modules/base/rendering/renderablecartesianaxes.h +++ b/modules/base/rendering/renderablecartesianaxes.h @@ -42,7 +42,7 @@ namespace openspace { class RenderableCartesianAxes : public Renderable { public: - RenderableCartesianAxes(const ghoul::Dictionary& dictionary); + explicit RenderableCartesianAxes(const ghoul::Dictionary& dictionary); ~RenderableCartesianAxes() override = default; void initializeGL() override; diff --git a/modules/base/rendering/renderabledisc.h b/modules/base/rendering/renderabledisc.h index 7393387771..0fabb2094b 100644 --- a/modules/base/rendering/renderabledisc.h +++ b/modules/base/rendering/renderabledisc.h @@ -42,7 +42,7 @@ namespace documentation { struct Documentation; } class RenderableDisc : public Renderable { public: - RenderableDisc(const ghoul::Dictionary& dictionary); + explicit RenderableDisc(const ghoul::Dictionary& dictionary); void initialize() override; void initializeGL() override; diff --git a/modules/base/rendering/renderabledistancelabel.h b/modules/base/rendering/renderabledistancelabel.h index 0f785b2da7..be6d71a9fc 100644 --- a/modules/base/rendering/renderabledistancelabel.h +++ b/modules/base/rendering/renderabledistancelabel.h @@ -37,7 +37,7 @@ namespace documentation { struct Documentation; } class RenderableDistanceLabel : public RenderableLabel { public: - RenderableDistanceLabel(const ghoul::Dictionary& dictionary); + explicit RenderableDistanceLabel(const ghoul::Dictionary& dictionary); void update(const UpdateData& data) override; static documentation::Documentation Documentation(); diff --git a/modules/base/rendering/renderablelabel.h b/modules/base/rendering/renderablelabel.h index c6684c8c60..cfdc8b3ba4 100644 --- a/modules/base/rendering/renderablelabel.h +++ b/modules/base/rendering/renderablelabel.h @@ -56,7 +56,7 @@ struct LinePoint; class RenderableLabel : public Renderable { public: - RenderableLabel(const ghoul::Dictionary& dictionary); + explicit RenderableLabel(const ghoul::Dictionary& dictionary); void initialize() override; void initializeGL() override; diff --git a/modules/base/rendering/renderablemodel.h b/modules/base/rendering/renderablemodel.h index 78bdbafd70..6c2f9cf471 100644 --- a/modules/base/rendering/renderablemodel.h +++ b/modules/base/rendering/renderablemodel.h @@ -55,7 +55,7 @@ namespace documentation { struct Documentation; } class RenderableModel : public Renderable { public: - RenderableModel(const ghoul::Dictionary& dictionary); + explicit RenderableModel(const ghoul::Dictionary& dictionary); ~RenderableModel() override = default; void initialize() override; diff --git a/modules/base/rendering/renderablenodearrow.h b/modules/base/rendering/renderablenodearrow.h index d55b24f768..d438835b49 100644 --- a/modules/base/rendering/renderablenodearrow.h +++ b/modules/base/rendering/renderablenodearrow.h @@ -46,7 +46,7 @@ class Translation; */ class RenderableNodeArrow : public Renderable { public: - RenderableNodeArrow(const ghoul::Dictionary& dictionary); + explicit RenderableNodeArrow(const ghoul::Dictionary& dictionary); ~RenderableNodeArrow() override = default; void initializeGL() override; @@ -60,6 +60,7 @@ public: private: struct Shading : properties::PropertyOwner { Shading(); + properties::BoolProperty enabled; properties::FloatProperty ambientIntensity; properties::FloatProperty diffuseIntensity; diff --git a/modules/base/rendering/renderablenodeline.h b/modules/base/rendering/renderablenodeline.h index abbf9ca3fe..9823c36381 100644 --- a/modules/base/rendering/renderablenodeline.h +++ b/modules/base/rendering/renderablenodeline.h @@ -45,7 +45,7 @@ class Translation; */ class RenderableNodeLine : public Renderable { public: - RenderableNodeLine(const ghoul::Dictionary& dictionary); + explicit RenderableNodeLine(const ghoul::Dictionary& dictionary); ~RenderableNodeLine() override = default; static documentation::Documentation Documentation(); diff --git a/modules/base/rendering/renderableplane.h b/modules/base/rendering/renderableplane.h index e1e78d20ff..ffd628e939 100644 --- a/modules/base/rendering/renderableplane.h +++ b/modules/base/rendering/renderableplane.h @@ -51,7 +51,7 @@ struct LinePoint; class RenderablePlane : public Renderable { public: - RenderablePlane(const ghoul::Dictionary& dictionary); + explicit RenderablePlane(const ghoul::Dictionary& dictionary); void initializeGL() override; void deinitializeGL() override; diff --git a/modules/base/rendering/renderableplaneimagelocal.h b/modules/base/rendering/renderableplaneimagelocal.h index a20428aedc..73f1fa7c60 100644 --- a/modules/base/rendering/renderableplaneimagelocal.h +++ b/modules/base/rendering/renderableplaneimagelocal.h @@ -39,7 +39,7 @@ namespace documentation { struct Documentation; } class RenderablePlaneImageLocal : public RenderablePlane { public: - RenderablePlaneImageLocal(const ghoul::Dictionary& dictionary); + explicit RenderablePlaneImageLocal(const ghoul::Dictionary& dictionary); void initializeGL() override; void deinitializeGL() override; diff --git a/modules/base/rendering/renderableplaneimageonline.h b/modules/base/rendering/renderableplaneimageonline.h index 73d012fe5b..1f17977536 100644 --- a/modules/base/rendering/renderableplaneimageonline.h +++ b/modules/base/rendering/renderableplaneimageonline.h @@ -41,7 +41,7 @@ namespace documentation { struct Documentation; } class RenderablePlaneImageOnline : public RenderablePlane { public: - RenderablePlaneImageOnline(const ghoul::Dictionary& dictionary); + explicit RenderablePlaneImageOnline(const ghoul::Dictionary& dictionary); void deinitializeGL() override; diff --git a/modules/base/rendering/renderableplanetimevaryingimage.h b/modules/base/rendering/renderableplanetimevaryingimage.h index 9bba43a79c..dc1ca2001f 100644 --- a/modules/base/rendering/renderableplanetimevaryingimage.h +++ b/modules/base/rendering/renderableplanetimevaryingimage.h @@ -41,7 +41,7 @@ namespace documentation { struct Documentation; } class RenderablePlaneTimeVaryingImage : public RenderablePlane { public: - RenderablePlaneTimeVaryingImage(const ghoul::Dictionary& dictionary); + explicit RenderablePlaneTimeVaryingImage(const ghoul::Dictionary& dictionary); void initialize() override; void initializeGL() override; diff --git a/modules/base/rendering/renderableprism.h b/modules/base/rendering/renderableprism.h index 1e920ac65a..4005ea59d8 100644 --- a/modules/base/rendering/renderableprism.h +++ b/modules/base/rendering/renderableprism.h @@ -42,7 +42,7 @@ namespace documentation { struct Documentation; } class RenderablePrism : public Renderable { public: - RenderablePrism(const ghoul::Dictionary& dictionary); + explicit RenderablePrism(const ghoul::Dictionary& dictionary); void initialize() override; void initializeGL() override; diff --git a/modules/base/rendering/renderablesphere.h b/modules/base/rendering/renderablesphere.h index c89d0d1d6b..3fa77a0d63 100644 --- a/modules/base/rendering/renderablesphere.h +++ b/modules/base/rendering/renderablesphere.h @@ -42,7 +42,7 @@ namespace documentation { struct Documentation; } class RenderableSphere : public Renderable { public: - RenderableSphere(const ghoul::Dictionary& dictionary); + explicit RenderableSphere(const ghoul::Dictionary& dictionary); void initializeGL() override; void deinitializeGL() override; diff --git a/modules/base/rendering/renderablesphereimagelocal.h b/modules/base/rendering/renderablesphereimagelocal.h index b77ff0e159..3117a54468 100644 --- a/modules/base/rendering/renderablesphereimagelocal.h +++ b/modules/base/rendering/renderablesphereimagelocal.h @@ -40,7 +40,7 @@ namespace documentation { struct Documentation; } class RenderableSphereImageLocal : public RenderableSphere { public: - RenderableSphereImageLocal(const ghoul::Dictionary& dictionary); + explicit RenderableSphereImageLocal(const ghoul::Dictionary& dictionary); void initialize() override; void initializeGL() override; diff --git a/modules/base/rendering/renderablesphereimageonline.h b/modules/base/rendering/renderablesphereimageonline.h index 9059e82c18..e2a6e4f7e0 100644 --- a/modules/base/rendering/renderablesphereimageonline.h +++ b/modules/base/rendering/renderablesphereimageonline.h @@ -43,7 +43,7 @@ namespace documentation { struct Documentation; } */ class RenderableSphereImageOnline : public RenderableSphere { public: - RenderableSphereImageOnline(const ghoul::Dictionary& dictionary); + explicit RenderableSphereImageOnline(const ghoul::Dictionary& dictionary); void deinitializeGL() override; diff --git a/modules/base/rendering/renderabletimevaryingsphere.h b/modules/base/rendering/renderabletimevaryingsphere.h index 0664b96e60..a6322d572b 100644 --- a/modules/base/rendering/renderabletimevaryingsphere.h +++ b/modules/base/rendering/renderabletimevaryingsphere.h @@ -40,7 +40,7 @@ namespace documentation { struct Documentation; } class RenderableTimeVaryingSphere : public RenderableSphere { public: - RenderableTimeVaryingSphere(const ghoul::Dictionary& dictionary); + explicit RenderableTimeVaryingSphere(const ghoul::Dictionary& dictionary); void initializeGL() override; void deinitializeGL() override; diff --git a/modules/base/rendering/renderabletrail.h b/modules/base/rendering/renderabletrail.h index bc701e4c91..08b2948101 100644 --- a/modules/base/rendering/renderabletrail.h +++ b/modules/base/rendering/renderabletrail.h @@ -78,6 +78,7 @@ public: struct Appearance : properties::PropertyOwner { Appearance(); + /// Specifies the base color of the line before fading properties::Vec3Property lineColor; /// Settings that enables or disables the line fading diff --git a/modules/base/rendering/screenspacedashboard.h b/modules/base/rendering/screenspacedashboard.h index 0bfd86c303..ba16be8526 100644 --- a/modules/base/rendering/screenspacedashboard.h +++ b/modules/base/rendering/screenspacedashboard.h @@ -42,7 +42,7 @@ namespace scripting { struct LuaLibrary; } class ScreenSpaceDashboard: public ScreenSpaceFramebuffer { public: - ScreenSpaceDashboard(const ghoul::Dictionary& dictionary); + explicit ScreenSpaceDashboard(const ghoul::Dictionary& dictionary); virtual ~ScreenSpaceDashboard() override = default; bool initializeGL() override; diff --git a/modules/base/rendering/screenspaceframebuffer.cpp b/modules/base/rendering/screenspaceframebuffer.cpp index 333e6d9cce..5e20441518 100644 --- a/modules/base/rendering/screenspaceframebuffer.cpp +++ b/modules/base/rendering/screenspaceframebuffer.cpp @@ -164,7 +164,7 @@ void ScreenSpaceFramebuffer::setSize(glm::vec4 size) { _size = std::move(size); } -void ScreenSpaceFramebuffer::addRenderFunction(std::function renderFunction) { +void ScreenSpaceFramebuffer::addRenderFunction(RenderFunction renderFunction) { _renderFunctions.push_back(std::move(renderFunction)); } diff --git a/modules/base/rendering/screenspaceframebuffer.h b/modules/base/rendering/screenspaceframebuffer.h index b79dceb3b3..7b134614bc 100644 --- a/modules/base/rendering/screenspaceframebuffer.h +++ b/modules/base/rendering/screenspaceframebuffer.h @@ -48,7 +48,7 @@ class ScreenSpaceFramebuffer : public ScreenSpaceRenderable { public: using RenderFunction = std::function; - ScreenSpaceFramebuffer(const ghoul::Dictionary& dictionary = ghoul::Dictionary()); + explicit ScreenSpaceFramebuffer(const ghoul::Dictionary& dictionary); virtual ~ScreenSpaceFramebuffer() override; bool initializeGL() override; diff --git a/modules/base/rendering/screenspaceimagelocal.h b/modules/base/rendering/screenspaceimagelocal.h index 0c1d3ef0e4..f9b35341ea 100644 --- a/modules/base/rendering/screenspaceimagelocal.h +++ b/modules/base/rendering/screenspaceimagelocal.h @@ -37,7 +37,7 @@ namespace documentation { struct Documentation; } class ScreenSpaceImageLocal : public ScreenSpaceRenderable { public: - ScreenSpaceImageLocal(const ghoul::Dictionary& dictionary); + explicit ScreenSpaceImageLocal(const ghoul::Dictionary& dictionary); bool deinitializeGL() override; diff --git a/modules/base/rendering/screenspaceimageonline.h b/modules/base/rendering/screenspaceimageonline.h index 98339296ed..6a2a34f22b 100644 --- a/modules/base/rendering/screenspaceimageonline.h +++ b/modules/base/rendering/screenspaceimageonline.h @@ -38,7 +38,7 @@ namespace documentation { struct Documentation; } class ScreenSpaceImageOnline : public ScreenSpaceRenderable { public: - ScreenSpaceImageOnline(const ghoul::Dictionary& dictionary); + explicit ScreenSpaceImageOnline(const ghoul::Dictionary& dictionary); virtual ~ScreenSpaceImageOnline() override; bool deinitializeGL() override; diff --git a/modules/base/rotation/constantrotation.h b/modules/base/rotation/constantrotation.h index df17e516ba..8ae5b7da4e 100644 --- a/modules/base/rotation/constantrotation.h +++ b/modules/base/rotation/constantrotation.h @@ -36,7 +36,7 @@ namespace documentation { struct Documentation; } class ConstantRotation : public Rotation { public: - ConstantRotation(const ghoul::Dictionary& dictionary); + explicit ConstantRotation(const ghoul::Dictionary& dictionary); glm::dmat3 matrix(const UpdateData& data) const override; diff --git a/modules/base/rotation/fixedrotation.h b/modules/base/rotation/fixedrotation.h index 114246fa3c..ea55d77aa8 100644 --- a/modules/base/rotation/fixedrotation.h +++ b/modules/base/rotation/fixedrotation.h @@ -41,15 +41,15 @@ namespace documentation { struct Documentation; } class FixedRotation : public Rotation { public: - FixedRotation(const ghoul::Dictionary& dictionary); + explicit FixedRotation(const ghoul::Dictionary& dictionary); bool initialize() override; - static documentation::Documentation Documentation(); - void update(const UpdateData& data) override; glm::dmat3 matrix(const UpdateData& data) const override; + static documentation::Documentation Documentation(); + private: glm::vec3 xAxis() const; glm::vec3 yAxis() const; diff --git a/modules/base/rotation/multirotation.h b/modules/base/rotation/multirotation.h index 6e672e40cf..335330a7ad 100644 --- a/modules/base/rotation/multirotation.h +++ b/modules/base/rotation/multirotation.h @@ -37,9 +37,10 @@ namespace documentation { struct Documentation; } class MultiRotation : public Rotation { public: - MultiRotation(const ghoul::Dictionary& dictionary); + explicit MultiRotation(const ghoul::Dictionary& dictionary); glm::dmat3 matrix(const UpdateData& data) const override; + static documentation::Documentation Documentation(); private: diff --git a/modules/base/rotation/staticrotation.h b/modules/base/rotation/staticrotation.h index 5515bd5f65..b6ef74c586 100644 --- a/modules/base/rotation/staticrotation.h +++ b/modules/base/rotation/staticrotation.h @@ -36,7 +36,7 @@ namespace documentation { struct Documentation; } class StaticRotation : public Rotation { public: StaticRotation(); - StaticRotation(const ghoul::Dictionary& dictionary); + explicit StaticRotation(const ghoul::Dictionary& dictionary); glm::dmat3 matrix(const UpdateData& data) const override; diff --git a/modules/base/rotation/timelinerotation.h b/modules/base/rotation/timelinerotation.h index c8250b571d..b84e3daa3c 100644 --- a/modules/base/rotation/timelinerotation.h +++ b/modules/base/rotation/timelinerotation.h @@ -38,7 +38,8 @@ namespace documentation { struct Documentation; } class TimelineRotation : public Rotation { public: - TimelineRotation(const ghoul::Dictionary& dictionary); + explicit TimelineRotation(const ghoul::Dictionary& dictionary); + glm::dmat3 matrix(const UpdateData& data) const override; static documentation::Documentation Documentation(); diff --git a/modules/base/scale/multiscale.h b/modules/base/scale/multiscale.h index 886747e2af..c55e05b1b9 100644 --- a/modules/base/scale/multiscale.h +++ b/modules/base/scale/multiscale.h @@ -33,7 +33,8 @@ namespace documentation { struct Documentation; } class MultiScale : public Scale { public: - MultiScale(const ghoul::Dictionary& dictionary); + explicit MultiScale(const ghoul::Dictionary& dictionary); + glm::dvec3 scaleValue(const UpdateData& data) const override; static documentation::Documentation Documentation(); diff --git a/modules/base/scale/nonuniformstaticscale.h b/modules/base/scale/nonuniformstaticscale.h index 58acfd0802..665126dad6 100644 --- a/modules/base/scale/nonuniformstaticscale.h +++ b/modules/base/scale/nonuniformstaticscale.h @@ -36,6 +36,7 @@ namespace documentation { struct Documentation; } class NonUniformStaticScale : public Scale { public: explicit NonUniformStaticScale(const ghoul::Dictionary& dictionary); + glm::dvec3 scaleValue(const UpdateData& data) const override; static documentation::Documentation Documentation(); diff --git a/modules/base/scale/staticscale.h b/modules/base/scale/staticscale.h index a57cb2b544..db8907dfe0 100644 --- a/modules/base/scale/staticscale.h +++ b/modules/base/scale/staticscale.h @@ -36,7 +36,8 @@ namespace documentation { struct Documentation; } class StaticScale : public Scale { public: StaticScale(); - StaticScale(const ghoul::Dictionary& dictionary); + explicit StaticScale(const ghoul::Dictionary& dictionary); + glm::dvec3 scaleValue(const UpdateData& data) const override; static documentation::Documentation Documentation(); diff --git a/modules/base/scale/timedependentscale.h b/modules/base/scale/timedependentscale.h index 99c201be00..b2ac97d80d 100644 --- a/modules/base/scale/timedependentscale.h +++ b/modules/base/scale/timedependentscale.h @@ -37,7 +37,8 @@ namespace documentation { struct Documentation; } class TimeDependentScale : public Scale { public: - TimeDependentScale(const ghoul::Dictionary& dictionary); + explicit TimeDependentScale(const ghoul::Dictionary& dictionary); + glm::dvec3 scaleValue(const UpdateData& data) const override; static documentation::Documentation Documentation(); diff --git a/modules/base/timeframe/timeframeinterval.cpp b/modules/base/timeframe/timeframeinterval.cpp index 9e6d3feaeb..4fd781e563 100644 --- a/modules/base/timeframe/timeframeinterval.cpp +++ b/modules/base/timeframe/timeframeinterval.cpp @@ -85,18 +85,6 @@ bool TimeFrameInterval::isActive(const Time& time) const { return true; } -TimeFrameInterval::TimeFrameInterval() - : _hasStart(HasStartInfo, false) - , _start(StartInfo, 0, 0, 1E9) - , _hasEnd(HasEndInfo, false) - , _end(EndInfo, 0, 0, 1E9) -{ - addProperty(_hasStart); - addProperty(_start); - addProperty(_hasEnd); - addProperty(_end); -} - TimeFrameInterval::TimeFrameInterval(const ghoul::Dictionary& dictionary) : _hasStart(HasStartInfo, false) , _start(StartInfo, 0, 0, 1E9) diff --git a/modules/base/timeframe/timeframeinterval.h b/modules/base/timeframe/timeframeinterval.h index 59e24e5489..0592967a2d 100644 --- a/modules/base/timeframe/timeframeinterval.h +++ b/modules/base/timeframe/timeframeinterval.h @@ -38,8 +38,8 @@ namespace documentation { struct Documentation; } class TimeFrameInterval : public TimeFrame { public: - TimeFrameInterval(); - TimeFrameInterval(const ghoul::Dictionary& dictionary); + explicit TimeFrameInterval(const ghoul::Dictionary& dictionary); + bool isActive(const Time&) const override; static documentation::Documentation Documentation(); diff --git a/modules/base/timeframe/timeframeunion.h b/modules/base/timeframe/timeframeunion.h index bd61910709..e26cb0f78c 100644 --- a/modules/base/timeframe/timeframeunion.h +++ b/modules/base/timeframe/timeframeunion.h @@ -35,8 +35,8 @@ namespace documentation { struct Documentation; } class TimeFrameUnion : public TimeFrame { public: - TimeFrameUnion() = default; - TimeFrameUnion(const ghoul::Dictionary& dictionary); + explicit TimeFrameUnion(const ghoul::Dictionary& dictionary); + bool isActive(const Time&) const override; static documentation::Documentation Documentation(); diff --git a/modules/base/translation/multitranslation.h b/modules/base/translation/multitranslation.h index 0647827361..a39cb158e8 100644 --- a/modules/base/translation/multitranslation.h +++ b/modules/base/translation/multitranslation.h @@ -35,7 +35,7 @@ namespace documentation { struct Documentation; } class MultiTranslation : public Translation { public: - MultiTranslation(const ghoul::Dictionary& dictionary); + explicit MultiTranslation(const ghoul::Dictionary& dictionary); glm::dvec3 position(const UpdateData& data) const override; static documentation::Documentation Documentation(); diff --git a/modules/base/translation/statictranslation.h b/modules/base/translation/statictranslation.h index fb7d51e712..60f1c3e3e5 100644 --- a/modules/base/translation/statictranslation.h +++ b/modules/base/translation/statictranslation.h @@ -38,7 +38,7 @@ namespace documentation { struct Documentation; } class StaticTranslation : public Translation { public: StaticTranslation(); - StaticTranslation(const ghoul::Dictionary& dictionary); + explicit StaticTranslation(const ghoul::Dictionary& dictionary); glm::dvec3 position(const UpdateData& data) const override; static documentation::Documentation Documentation(); diff --git a/modules/base/translation/timelinetranslation.h b/modules/base/translation/timelinetranslation.h index 07a4b56a96..1440ab47e7 100644 --- a/modules/base/translation/timelinetranslation.h +++ b/modules/base/translation/timelinetranslation.h @@ -39,7 +39,7 @@ namespace documentation { struct Documentation; } class TimelineTranslation : public Translation { public: - TimelineTranslation(const ghoul::Dictionary& dictionary); + explicit TimelineTranslation(const ghoul::Dictionary& dictionary); glm::dvec3 position(const UpdateData& data) const override; static documentation::Documentation Documentation(); diff --git a/modules/debugging/rendering/debugrenderer.h b/modules/debugging/rendering/debugrenderer.h index 666e9b78f7..de58f6991e 100644 --- a/modules/debugging/rendering/debugrenderer.h +++ b/modules/debugging/rendering/debugrenderer.h @@ -55,7 +55,7 @@ public: /** * Instantiate a new DebugRenderer with a custom shader program. */ - DebugRenderer(std::unique_ptr programObject); + explicit DebugRenderer(std::unique_ptr programObject); ~DebugRenderer() = default; /** diff --git a/modules/debugging/rendering/screenspacedebugplane.h b/modules/debugging/rendering/screenspacedebugplane.h index a882a6198a..e3141fc533 100644 --- a/modules/debugging/rendering/screenspacedebugplane.h +++ b/modules/debugging/rendering/screenspacedebugplane.h @@ -33,7 +33,7 @@ namespace openspace { class ScreenSpaceDebugPlane : public ScreenSpaceRenderable { public: - ScreenSpaceDebugPlane(const ghoul::Dictionary& dictionary); + explicit ScreenSpaceDebugPlane(const ghoul::Dictionary& dictionary); static documentation::Documentation Documentation(); diff --git a/modules/exoplanets/rendering/renderableorbitdisc.h b/modules/exoplanets/rendering/renderableorbitdisc.h index 42eb12173a..a90a043cdc 100644 --- a/modules/exoplanets/rendering/renderableorbitdisc.h +++ b/modules/exoplanets/rendering/renderableorbitdisc.h @@ -45,7 +45,7 @@ namespace documentation { struct Documentation; } class RenderableOrbitDisc : public Renderable { public: - RenderableOrbitDisc(const ghoul::Dictionary& dictionary); + explicit RenderableOrbitDisc(const ghoul::Dictionary& dictionary); void initialize() override; void initializeGL() override; diff --git a/modules/exoplanets/tasks/exoplanetsdatapreparationtask.h b/modules/exoplanets/tasks/exoplanetsdatapreparationtask.h index baeddc3dc5..4c5ae3feee 100644 --- a/modules/exoplanets/tasks/exoplanetsdatapreparationtask.h +++ b/modules/exoplanets/tasks/exoplanetsdatapreparationtask.h @@ -43,7 +43,8 @@ public: ExoplanetDataEntry dataEntry; }; - ExoplanetsDataPreparationTask(const ghoul::Dictionary& dictionary); + explicit ExoplanetsDataPreparationTask(const ghoul::Dictionary& dictionary); + std::string description() override; void perform(const Task::ProgressCallback& progressCallback) override; static documentation::Documentation documentation(); diff --git a/modules/fieldlines/rendering/renderablefieldlines.h b/modules/fieldlines/rendering/renderablefieldlines.h index cd53f59bdf..0297a45c5a 100644 --- a/modules/fieldlines/rendering/renderablefieldlines.h +++ b/modules/fieldlines/rendering/renderablefieldlines.h @@ -43,7 +43,7 @@ struct LinePoint; class RenderableFieldlines : public Renderable { public: - RenderableFieldlines(const ghoul::Dictionary& dictionary); + explicit RenderableFieldlines(const ghoul::Dictionary& dictionary); void initializeGL() override; void deinitializeGL() override; @@ -57,7 +57,6 @@ private: typedef std::vector Line; void initializeDefaultPropertyValues(); - std::vector getFieldlinesData(); void loadSeedPoints(); void loadSeedPointsFromFile(); void loadSeedPointsFromTable(); diff --git a/modules/fieldlinessequence/rendering/renderablefieldlinessequence.h b/modules/fieldlinessequence/rendering/renderablefieldlinessequence.h index c7dbf61c81..e69a4b0533 100644 --- a/modules/fieldlinessequence/rendering/renderablefieldlinessequence.h +++ b/modules/fieldlinessequence/rendering/renderablefieldlinessequence.h @@ -41,7 +41,7 @@ namespace openspace { class RenderableFieldlinesSequence : public Renderable { public: - RenderableFieldlinesSequence(const ghoul::Dictionary& dictionary); + explicit RenderableFieldlinesSequence(const ghoul::Dictionary& dictionary); void initialize() override; void initializeGL() override; void deinitializeGL() override; diff --git a/modules/fitsfilereader/include/fitsfilereader.h b/modules/fitsfilereader/include/fitsfilereader.h index 6c4d5d35e8..ad486fbbb6 100644 --- a/modules/fitsfilereader/include/fitsfilereader.h +++ b/modules/fitsfilereader/include/fitsfilereader.h @@ -60,7 +60,7 @@ struct TableData { class FitsFileReader { public: - FitsFileReader(bool verboseMode); + explicit FitsFileReader(bool verboseMode); ~FitsFileReader(); template diff --git a/modules/gaia/rendering/octreeculler.h b/modules/gaia/rendering/octreeculler.h index 237b13afac..f7b3378c85 100644 --- a/modules/gaia/rendering/octreeculler.h +++ b/modules/gaia/rendering/octreeculler.h @@ -45,7 +45,7 @@ public: * \param viewFrustum This is the view space in normalized device coordinates space. * Hence it is an axis aligned bounding box and not a real frustum */ - OctreeCuller(globebrowsing::AABB3 viewFrustum); + explicit OctreeCuller(globebrowsing::AABB3 viewFrustum); ~OctreeCuller() = default; diff --git a/modules/gaia/tasks/constructoctreetask.h b/modules/gaia/tasks/constructoctreetask.h index 387aa9fd0e..cc6d8081b6 100644 --- a/modules/gaia/tasks/constructoctreetask.h +++ b/modules/gaia/tasks/constructoctreetask.h @@ -37,7 +37,7 @@ namespace documentation { struct Documentation; } class ConstructOctreeTask : public Task { public: - ConstructOctreeTask(const ghoul::Dictionary& dictionary); + explicit ConstructOctreeTask(const ghoul::Dictionary& dictionary); ~ConstructOctreeTask() override = default; std::string description() override; diff --git a/modules/gaia/tasks/readfitstask.h b/modules/gaia/tasks/readfitstask.h index d7a70325f0..1bebeb2843 100644 --- a/modules/gaia/tasks/readfitstask.h +++ b/modules/gaia/tasks/readfitstask.h @@ -38,7 +38,7 @@ namespace documentation { struct Documentation; } class ReadFitsTask : public Task { public: - ReadFitsTask(const ghoul::Dictionary& dictionary); + explicit ReadFitsTask(const ghoul::Dictionary& dictionary); ~ReadFitsTask() override = default; std::string description() override; diff --git a/modules/gaia/tasks/readspecktask.h b/modules/gaia/tasks/readspecktask.h index d665f9ecf3..437141663c 100644 --- a/modules/gaia/tasks/readspecktask.h +++ b/modules/gaia/tasks/readspecktask.h @@ -36,7 +36,7 @@ namespace documentation { struct Documentation; } class ReadSpeckTask : public Task { public: - ReadSpeckTask(const ghoul::Dictionary& dictionary); + explicit ReadSpeckTask(const ghoul::Dictionary& dictionary); ~ReadSpeckTask() override = default; std::string description() override; diff --git a/modules/galaxy/rendering/galaxyraycaster.h b/modules/galaxy/rendering/galaxyraycaster.h index 8313d701ed..ef0bc8d525 100644 --- a/modules/galaxy/rendering/galaxyraycaster.h +++ b/modules/galaxy/rendering/galaxyraycaster.h @@ -45,7 +45,7 @@ struct RaycastData; class GalaxyRaycaster : public VolumeRaycaster { public: - GalaxyRaycaster(ghoul::opengl::Texture& texture, + explicit GalaxyRaycaster(ghoul::opengl::Texture& texture, const std::optional& raycastingShader = std::nullopt); ~GalaxyRaycaster() override = default; diff --git a/modules/galaxy/tasks/milkywayconversiontask.h b/modules/galaxy/tasks/milkywayconversiontask.h index c608aa4e55..74384e8451 100644 --- a/modules/galaxy/tasks/milkywayconversiontask.h +++ b/modules/galaxy/tasks/milkywayconversiontask.h @@ -40,7 +40,7 @@ namespace documentation { struct Documentation; } */ class MilkywayConversionTask : public Task { public: - MilkywayConversionTask(const ghoul::Dictionary& dictionary); + explicit MilkywayConversionTask(const ghoul::Dictionary& dictionary); ~MilkywayConversionTask() override = default; std::string description() override; void perform(const Task::ProgressCallback& onProgress) override; diff --git a/modules/galaxy/tasks/milkywaypointsconversiontask.h b/modules/galaxy/tasks/milkywaypointsconversiontask.h index 6c9ec70069..346424984e 100644 --- a/modules/galaxy/tasks/milkywaypointsconversiontask.h +++ b/modules/galaxy/tasks/milkywaypointsconversiontask.h @@ -43,7 +43,7 @@ namespace documentation { struct Documentation; } */ class MilkywayPointsConversionTask : public Task { public: - MilkywayPointsConversionTask(const ghoul::Dictionary& dictionary); + explicit MilkywayPointsConversionTask(const ghoul::Dictionary& dictionary); ~MilkywayPointsConversionTask() override = default; std::string description() override; diff --git a/modules/globebrowsing/src/dashboarditemglobelocation.h b/modules/globebrowsing/src/dashboarditemglobelocation.h index 5f55f39ca3..7cffc3c891 100644 --- a/modules/globebrowsing/src/dashboarditemglobelocation.h +++ b/modules/globebrowsing/src/dashboarditemglobelocation.h @@ -38,7 +38,7 @@ namespace documentation { struct Documentation; } class DashboardItemGlobeLocation : public DashboardTextItem { public: - DashboardItemGlobeLocation(const ghoul::Dictionary& dictionary); + explicit DashboardItemGlobeLocation(const ghoul::Dictionary& dictionary); ~DashboardItemGlobeLocation() override = default; void render(glm::vec2& penPosition) override; diff --git a/modules/globebrowsing/src/ellipsoid.h b/modules/globebrowsing/src/ellipsoid.h index 7187431f07..9fa33b4a91 100644 --- a/modules/globebrowsing/src/ellipsoid.h +++ b/modules/globebrowsing/src/ellipsoid.h @@ -56,7 +56,7 @@ public: /** * \param radii defines three radii for the Ellipsoid */ - Ellipsoid(glm::dvec3 radii = glm::dvec3(1.0)); + explicit Ellipsoid(glm::dvec3 radii = glm::dvec3(1.0)); /** * Scales a point along the geocentric normal and places it on the surface of the diff --git a/modules/globebrowsing/src/geodeticpatch.h b/modules/globebrowsing/src/geodeticpatch.h index d357eac99f..581264b238 100644 --- a/modules/globebrowsing/src/geodeticpatch.h +++ b/modules/globebrowsing/src/geodeticpatch.h @@ -40,7 +40,7 @@ public: GeodeticPatch(const GeodeticPatch& patch) = default; - GeodeticPatch(const TileIndex& tileIndex); + explicit GeodeticPatch(const TileIndex& tileIndex); void setCenter(Geodetic2 center); void setHalfSize(Geodetic2 halfSize); diff --git a/modules/globebrowsing/src/geojson/geojsonproperties.h b/modules/globebrowsing/src/geojson/geojsonproperties.h index d79b57d078..9ab21a7843 100644 --- a/modules/globebrowsing/src/geojson/geojsonproperties.h +++ b/modules/globebrowsing/src/geojson/geojsonproperties.h @@ -45,6 +45,7 @@ class RenderableGlobe; struct GeoJsonProperties : public properties::PropertyOwner { GeoJsonProperties(); + void createFromDictionary(const ghoul::Dictionary& dictionary, const RenderableGlobe& globe); diff --git a/modules/globebrowsing/src/globerotation.h b/modules/globebrowsing/src/globerotation.h index ff24345555..e7aaeac623 100644 --- a/modules/globebrowsing/src/globerotation.h +++ b/modules/globebrowsing/src/globerotation.h @@ -37,7 +37,7 @@ class RenderableGlobe; class GlobeRotation : public Rotation { public: - GlobeRotation(const ghoul::Dictionary& dictionary); + explicit GlobeRotation(const ghoul::Dictionary& dictionary); void update(const UpdateData& data) override; glm::dmat3 matrix(const UpdateData& data) const override; diff --git a/modules/globebrowsing/src/globetranslation.h b/modules/globebrowsing/src/globetranslation.h index a2f7ce3e0b..f928f0408f 100644 --- a/modules/globebrowsing/src/globetranslation.h +++ b/modules/globebrowsing/src/globetranslation.h @@ -37,7 +37,7 @@ class RenderableGlobe; class GlobeTranslation : public Translation { public: - GlobeTranslation(const ghoul::Dictionary& dictionary); + explicit GlobeTranslation(const ghoul::Dictionary& dictionary); void update(const UpdateData& data) override; glm::dvec3 position(const UpdateData& data) const override; diff --git a/modules/globebrowsing/src/layergroup.h b/modules/globebrowsing/src/layergroup.h index 8140c23753..e4dc07f9b9 100644 --- a/modules/globebrowsing/src/layergroup.h +++ b/modules/globebrowsing/src/layergroup.h @@ -39,7 +39,7 @@ struct TileProvider; * Convenience class for dealing with multiple `Layer`s. */ struct LayerGroup : public properties::PropertyOwner { - LayerGroup(layers::Group group); + explicit LayerGroup(layers::Group group); void initialize(); void deinitialize(); diff --git a/modules/globebrowsing/src/lrucache.h b/modules/globebrowsing/src/lrucache.h index e7fdad0260..d9dd2770ba 100644 --- a/modules/globebrowsing/src/lrucache.h +++ b/modules/globebrowsing/src/lrucache.h @@ -44,7 +44,7 @@ public: /** * \param size This is the maximum size of the cache given in number of cached items */ - LRUCache(size_t size); + explicit LRUCache(size_t size); void put(KeyType key, ValueType value); std::vector putAndFetchPopped(KeyType key, ValueType value); diff --git a/modules/globebrowsing/src/lruthreadpool.h b/modules/globebrowsing/src/lruthreadpool.h index e4666d8f0a..6c40f07790 100644 --- a/modules/globebrowsing/src/lruthreadpool.h +++ b/modules/globebrowsing/src/lruthreadpool.h @@ -41,7 +41,7 @@ template class LRUThreadPool; template class LRUThreadPoolWorker { public: - LRUThreadPoolWorker(LRUThreadPool& pool); + explicit LRUThreadPoolWorker(LRUThreadPool& pool); void operator()(); private: diff --git a/modules/globebrowsing/src/prioritizingconcurrentjobmanager.h b/modules/globebrowsing/src/prioritizingconcurrentjobmanager.h index 8ff9e7b979..0cbdf76f27 100644 --- a/modules/globebrowsing/src/prioritizingconcurrentjobmanager.h +++ b/modules/globebrowsing/src/prioritizingconcurrentjobmanager.h @@ -42,7 +42,7 @@ namespace openspace::globebrowsing { template class PrioritizingConcurrentJobManager { public: - PrioritizingConcurrentJobManager(LRUThreadPool pool); + explicit PrioritizingConcurrentJobManager(LRUThreadPool pool); /** * Enqueues a job which is identified using a given key. diff --git a/modules/globebrowsing/src/rawtiledatareader.cpp b/modules/globebrowsing/src/rawtiledatareader.cpp index 8c0d557708..d20598d538 100644 --- a/modules/globebrowsing/src/rawtiledatareader.cpp +++ b/modules/globebrowsing/src/rawtiledatareader.cpp @@ -641,7 +641,7 @@ void RawTileDataReader::readImageData(IODescription& io, RawTile::ReadError& wor IODescription RawTileDataReader::ioDescription(const TileIndex& tileIndex) const { IODescription io; - io.read.region = highestResPixelRegion(tileIndex, _padfTransform); + io.read.region = highestResPixelRegion(GeodeticPatch(tileIndex), _padfTransform); // write region starts in origin io.write.region.start = glm::ivec2(0); diff --git a/modules/globebrowsing/src/renderableglobe.h b/modules/globebrowsing/src/renderableglobe.h index d55c6f7d92..3a89163039 100644 --- a/modules/globebrowsing/src/renderableglobe.h +++ b/modules/globebrowsing/src/renderableglobe.h @@ -71,7 +71,7 @@ struct Chunk { WantSplit }; - Chunk(const TileIndex& ti); + explicit Chunk(const TileIndex& ti); const TileIndex tileIndex; const GeodeticPatch surfacePatch; @@ -97,7 +97,7 @@ enum class ShadowCompType { */ class RenderableGlobe : public Renderable { public: - RenderableGlobe(const ghoul::Dictionary& dictionary); + explicit RenderableGlobe(const ghoul::Dictionary& dictionary); ~RenderableGlobe() override = default; void initializeGL() override; diff --git a/modules/globebrowsing/src/ringscomponent.h b/modules/globebrowsing/src/ringscomponent.h index 94afbee543..6963acef0e 100644 --- a/modules/globebrowsing/src/ringscomponent.h +++ b/modules/globebrowsing/src/ringscomponent.h @@ -56,7 +56,7 @@ public: GeometryAndShading }; - RingsComponent(const ghoul::Dictionary& dictionary); + explicit RingsComponent(const ghoul::Dictionary& dictionary); void initialize(); void initializeGL(); diff --git a/modules/globebrowsing/src/tileprovider/defaulttileprovider.h b/modules/globebrowsing/src/tileprovider/defaulttileprovider.h index 0a90ed20cd..de1b514fc8 100644 --- a/modules/globebrowsing/src/tileprovider/defaulttileprovider.h +++ b/modules/globebrowsing/src/tileprovider/defaulttileprovider.h @@ -34,7 +34,7 @@ namespace openspace::globebrowsing { class DefaultTileProvider : public TileProvider { public: - DefaultTileProvider(const ghoul::Dictionary& dictionary); + explicit DefaultTileProvider(const ghoul::Dictionary& dictionary); Tile tile(const TileIndex& tileIndex) override final; Tile::Status tileStatus(const TileIndex& index) override final; diff --git a/modules/globebrowsing/src/tileprovider/imagesequencetileprovider.h b/modules/globebrowsing/src/tileprovider/imagesequencetileprovider.h index 9933685ae4..ab26c8389a 100644 --- a/modules/globebrowsing/src/tileprovider/imagesequencetileprovider.h +++ b/modules/globebrowsing/src/tileprovider/imagesequencetileprovider.h @@ -33,7 +33,7 @@ namespace openspace::globebrowsing { class ImageSequenceTileProvider : public TileProvider { public: - ImageSequenceTileProvider(const ghoul::Dictionary& dictionary); + explicit ImageSequenceTileProvider(const ghoul::Dictionary& dictionary); Tile tile(const TileIndex& tileIndex) override final; Tile::Status tileStatus(const TileIndex& index) override final; diff --git a/modules/globebrowsing/src/tileprovider/singleimagetileprovider.h b/modules/globebrowsing/src/tileprovider/singleimagetileprovider.h index 8ce9df104f..eed769ac3a 100644 --- a/modules/globebrowsing/src/tileprovider/singleimagetileprovider.h +++ b/modules/globebrowsing/src/tileprovider/singleimagetileprovider.h @@ -33,7 +33,7 @@ namespace openspace::globebrowsing { class SingleImageProvider : public TileProvider { public: - SingleImageProvider(const ghoul::Dictionary& dictionary); + explicit SingleImageProvider(const ghoul::Dictionary& dictionary); Tile tile(const TileIndex& tileIndex) override final; Tile::Status tileStatus(const TileIndex& index) override final; diff --git a/modules/globebrowsing/src/tileprovider/sizereferencetileprovider.cpp b/modules/globebrowsing/src/tileprovider/sizereferencetileprovider.cpp index a48e4e2d19..ef0c329008 100644 --- a/modules/globebrowsing/src/tileprovider/sizereferencetileprovider.cpp +++ b/modules/globebrowsing/src/tileprovider/sizereferencetileprovider.cpp @@ -56,11 +56,11 @@ SizeReferenceTileProvider::SizeReferenceTileProvider(const ghoul::Dictionary& di if (p.radii.has_value()) { if (std::holds_alternative(*p.radii)) { - _ellipsoid = std::get(*p.radii); + _ellipsoid = Ellipsoid(std::get(*p.radii)); } else { const double r = std::get(*p.radii); - _ellipsoid = glm::dvec3(r, r, r); + _ellipsoid = Ellipsoid(glm::dvec3(r, r, r)); } } } diff --git a/modules/globebrowsing/src/tileprovider/sizereferencetileprovider.h b/modules/globebrowsing/src/tileprovider/sizereferencetileprovider.h index c55dc21b74..622301f8f7 100644 --- a/modules/globebrowsing/src/tileprovider/sizereferencetileprovider.h +++ b/modules/globebrowsing/src/tileprovider/sizereferencetileprovider.h @@ -31,7 +31,7 @@ namespace openspace::globebrowsing { class SizeReferenceTileProvider : public TextTileProvider { public: - SizeReferenceTileProvider(const ghoul::Dictionary& dictionary); + explicit SizeReferenceTileProvider(const ghoul::Dictionary& dictionary); Tile tile(const TileIndex& tileIndex) override final; Tile::Status tileStatus(const TileIndex& index) override final; diff --git a/modules/globebrowsing/src/tileprovider/spoutimageprovider.h b/modules/globebrowsing/src/tileprovider/spoutimageprovider.h index f8033266d4..8f13bf4464 100644 --- a/modules/globebrowsing/src/tileprovider/spoutimageprovider.h +++ b/modules/globebrowsing/src/tileprovider/spoutimageprovider.h @@ -33,7 +33,7 @@ namespace openspace::globebrowsing { class SpoutImageProvider : public TileProvider { public: - SpoutImageProvider(const ghoul::Dictionary& dictionary); + explicit SpoutImageProvider(const ghoul::Dictionary& dictionary); Tile tile(const TileIndex& tileIndex) override final; Tile::Status tileStatus(const TileIndex& index) override final; diff --git a/modules/globebrowsing/src/tileprovider/temporaltileprovider.h b/modules/globebrowsing/src/tileprovider/temporaltileprovider.h index bfa04983da..cdb064b6ab 100644 --- a/modules/globebrowsing/src/tileprovider/temporaltileprovider.h +++ b/modules/globebrowsing/src/tileprovider/temporaltileprovider.h @@ -45,7 +45,7 @@ namespace openspace::globebrowsing { */ class TemporalTileProvider : public TileProvider { public: - TemporalTileProvider(const ghoul::Dictionary& dictionary); + explicit TemporalTileProvider(const ghoul::Dictionary& dictionary); Tile tile(const TileIndex& tileIndex) override final; Tile::Status tileStatus(const TileIndex& index) override final; @@ -65,7 +65,7 @@ private: }; struct InterpolateTileProvider : public TileProvider { - InterpolateTileProvider(const ghoul::Dictionary&); + explicit InterpolateTileProvider(const ghoul::Dictionary&); ~InterpolateTileProvider() override; Tile tile(const TileIndex& tileIndex) override final; diff --git a/modules/globebrowsing/src/tileprovider/texttileprovider.h b/modules/globebrowsing/src/tileprovider/texttileprovider.h index c26c10365c..0f2acbf2f8 100644 --- a/modules/globebrowsing/src/tileprovider/texttileprovider.h +++ b/modules/globebrowsing/src/tileprovider/texttileprovider.h @@ -31,7 +31,7 @@ namespace openspace::globebrowsing { class TextTileProvider : public TileProvider { public: - TextTileProvider(TileTextureInitData initData_, size_t fontSize_ = 48); + explicit TextTileProvider(TileTextureInitData initData_, size_t fontSize_ = 48); ~TextTileProvider() override; void reset() override; diff --git a/modules/globebrowsing/src/tileprovider/tileindextileprovider.h b/modules/globebrowsing/src/tileprovider/tileindextileprovider.h index 59cadf8706..31d2ba5418 100644 --- a/modules/globebrowsing/src/tileprovider/tileindextileprovider.h +++ b/modules/globebrowsing/src/tileprovider/tileindextileprovider.h @@ -33,7 +33,7 @@ namespace openspace::globebrowsing { class TileIndexTileProvider : public TextTileProvider { public: - TileIndexTileProvider(const ghoul::Dictionary& dictionary); + explicit TileIndexTileProvider(const ghoul::Dictionary& dictionary); Tile tile(const TileIndex& tileIndex) override final; Tile::Status tileStatus(const TileIndex& index) override final; diff --git a/modules/globebrowsing/src/tileprovider/tileproviderbydate.h b/modules/globebrowsing/src/tileprovider/tileproviderbydate.h index 82df82f761..89c2f90a5c 100644 --- a/modules/globebrowsing/src/tileprovider/tileproviderbydate.h +++ b/modules/globebrowsing/src/tileprovider/tileproviderbydate.h @@ -33,7 +33,7 @@ namespace openspace::globebrowsing { class TileProviderByDate : public TileProvider { public: - TileProviderByDate(const ghoul::Dictionary& dictionary); + explicit TileProviderByDate(const ghoul::Dictionary& dictionary); Tile tile(const TileIndex& tileIndex) override final; Tile::Status tileStatus(const TileIndex& index) override final; diff --git a/modules/globebrowsing/src/tileprovider/tileproviderbyindex.h b/modules/globebrowsing/src/tileprovider/tileproviderbyindex.h index 05830424f6..5519d41df8 100644 --- a/modules/globebrowsing/src/tileprovider/tileproviderbyindex.h +++ b/modules/globebrowsing/src/tileprovider/tileproviderbyindex.h @@ -31,7 +31,7 @@ namespace openspace::globebrowsing { class TileProviderByIndex : public TileProvider { public: - TileProviderByIndex(const ghoul::Dictionary& dictionary); + explicit TileProviderByIndex(const ghoul::Dictionary& dictionary); Tile tile(const TileIndex& tileIndex) override final; Tile::Status tileStatus(const TileIndex& index) override final; diff --git a/modules/globebrowsing/src/tileprovider/tileproviderbylevel.h b/modules/globebrowsing/src/tileprovider/tileproviderbylevel.h index ee1591f0bd..5b41db7b7d 100644 --- a/modules/globebrowsing/src/tileprovider/tileproviderbylevel.h +++ b/modules/globebrowsing/src/tileprovider/tileproviderbylevel.h @@ -31,7 +31,7 @@ namespace openspace::globebrowsing { class TileProviderByLevel : public TileProvider { public: - TileProviderByLevel(const ghoul::Dictionary& dictionary); + explicit TileProviderByLevel(const ghoul::Dictionary& dictionary); Tile tile(const TileIndex& tileIndex) override final; Tile::Status tileStatus(const TileIndex& index) override final; diff --git a/modules/globebrowsing/src/timequantizer.h b/modules/globebrowsing/src/timequantizer.h index 8e5c0f70c9..62f59f63d2 100644 --- a/modules/globebrowsing/src/timequantizer.h +++ b/modules/globebrowsing/src/timequantizer.h @@ -40,7 +40,7 @@ namespace openspace::globebrowsing { */ class RangedTime { public: - RangedTime() {} + RangedTime() = default; /** * Constructor that accepts an ISO8601 date/time string (`YYYY-MM-DDTHH:mm:ss`) for an @@ -118,12 +118,13 @@ private: class DateTime { public: DateTime() = default; + /** * Constructor that initializes with date/time string. * * \param initDateTime The ISO8601 date/time string (`YYYY-MM-DDTHH:mm:ss`) */ - DateTime(std::string_view initDateTime); + explicit DateTime(std::string_view initDateTime); /** * Set the date/time value. diff --git a/modules/imgui/include/guicomponent.h b/modules/imgui/include/guicomponent.h index 88e5b019e3..e4511d836a 100644 --- a/modules/imgui/include/guicomponent.h +++ b/modules/imgui/include/guicomponent.h @@ -40,7 +40,7 @@ public: /** * Constructor that initializes this components member variables. */ - GuiComponent(std::string identifier, std::string guiName = ""); + explicit GuiComponent(std::string identifier, std::string guiName = ""); /** * Returns if this component is enabled, that is, if it is currently active and diff --git a/modules/imgui/include/guigibscomponent.h b/modules/imgui/include/guigibscomponent.h index a50cd56b82..e3a55b4649 100644 --- a/modules/imgui/include/guigibscomponent.h +++ b/modules/imgui/include/guigibscomponent.h @@ -34,6 +34,7 @@ namespace openspace::gui { class GuiGIBSComponent : public GuiComponent { public: GuiGIBSComponent(); + void render() override; }; diff --git a/modules/imgui/include/guiglobebrowsingcomponent.h b/modules/imgui/include/guiglobebrowsingcomponent.h index 7b0e4b3e71..eb609dcbf2 100644 --- a/modules/imgui/include/guiglobebrowsingcomponent.h +++ b/modules/imgui/include/guiglobebrowsingcomponent.h @@ -34,6 +34,7 @@ namespace openspace::gui { class GuiGlobeBrowsingComponent : public GuiPropertyComponent { public: GuiGlobeBrowsingComponent(); + void render() override; private: diff --git a/modules/iswa/rendering/datacygnet.h b/modules/iswa/rendering/datacygnet.h index 68a61961e6..4c84aedb1d 100644 --- a/modules/iswa/rendering/datacygnet.h +++ b/modules/iswa/rendering/datacygnet.h @@ -43,7 +43,7 @@ class DataProcessor; */ class DataCygnet : public IswaCygnet { public: - DataCygnet(const ghoul::Dictionary& dictionary); + explicit DataCygnet(const ghoul::Dictionary& dictionary); ~DataCygnet(); protected: diff --git a/modules/iswa/rendering/dataplane.h b/modules/iswa/rendering/dataplane.h index 4dd6e91908..e9634878ab 100644 --- a/modules/iswa/rendering/dataplane.h +++ b/modules/iswa/rendering/dataplane.h @@ -39,7 +39,7 @@ namespace openspace { class DataPlane : public DataCygnet { friend class IswaBaseGroup; public: - DataPlane(const ghoul::Dictionary& dictionary); + explicit DataPlane(const ghoul::Dictionary& dictionary); ~DataPlane() = default; void initializeGL() override; diff --git a/modules/iswa/rendering/datasphere.h b/modules/iswa/rendering/datasphere.h index 5c8daefc27..711c191504 100644 --- a/modules/iswa/rendering/datasphere.h +++ b/modules/iswa/rendering/datasphere.h @@ -38,7 +38,7 @@ class Sphere; */ class DataSphere : public DataCygnet { public: - DataSphere(const ghoul::Dictionary& dictionary); + explicit DataSphere(const ghoul::Dictionary& dictionary); ~DataSphere(); void initializeGL() override; diff --git a/modules/iswa/rendering/iswacygnet.h b/modules/iswa/rendering/iswacygnet.h index 0b03f5b8bb..c956ec5b7a 100644 --- a/modules/iswa/rendering/iswacygnet.h +++ b/modules/iswa/rendering/iswacygnet.h @@ -43,7 +43,7 @@ class TransferFunction; class IswaCygnet : public Renderable { public: - IswaCygnet(const ghoul::Dictionary& dictionary); + explicit IswaCygnet(const ghoul::Dictionary& dictionary); virtual ~IswaCygnet(); void initializeGL() override; diff --git a/modules/iswa/rendering/kameleonplane.h b/modules/iswa/rendering/kameleonplane.h index c57f32cc9d..b7fcbca3f2 100644 --- a/modules/iswa/rendering/kameleonplane.h +++ b/modules/iswa/rendering/kameleonplane.h @@ -41,7 +41,7 @@ namespace openspace { */ class KameleonPlane : public DataCygnet { public: - KameleonPlane(const ghoul::Dictionary& dictionary); + explicit KameleonPlane(const ghoul::Dictionary& dictionary); ~KameleonPlane(); void initializeGL() override; diff --git a/modules/iswa/rendering/screenspacecygnet.h b/modules/iswa/rendering/screenspacecygnet.h index 9de184ec92..ded2be9132 100644 --- a/modules/iswa/rendering/screenspacecygnet.h +++ b/modules/iswa/rendering/screenspacecygnet.h @@ -33,7 +33,7 @@ namespace openspace { class ScreenSpaceCygnet : public ScreenSpaceImageOnline { public: - ScreenSpaceCygnet(const ghoul::Dictionary& dictionary); + explicit ScreenSpaceCygnet(const ghoul::Dictionary& dictionary); ~ScreenSpaceCygnet() = default; virtual void update() override; diff --git a/modules/iswa/rendering/texturecygnet.h b/modules/iswa/rendering/texturecygnet.h index 29f428efd0..6d80465b7d 100644 --- a/modules/iswa/rendering/texturecygnet.h +++ b/modules/iswa/rendering/texturecygnet.h @@ -36,7 +36,7 @@ namespace openspace { */ class TextureCygnet : public IswaCygnet { public: - TextureCygnet(const ghoul::Dictionary& dictionary); + explicit TextureCygnet(const ghoul::Dictionary& dictionary); ~TextureCygnet() = default; protected: diff --git a/modules/iswa/rendering/textureplane.h b/modules/iswa/rendering/textureplane.h index baa76c0ffc..177906aa35 100644 --- a/modules/iswa/rendering/textureplane.h +++ b/modules/iswa/rendering/textureplane.h @@ -38,7 +38,7 @@ namespace openspace { */ class TexturePlane : public TextureCygnet { public: - TexturePlane(const ghoul::Dictionary& dictionary); + explicit TexturePlane(const ghoul::Dictionary& dictionary); virtual ~TexturePlane() = default; void initializeGL() override; diff --git a/modules/kameleonvolume/kameleonvolumereader.h b/modules/kameleonvolume/kameleonvolumereader.h index 8cde8ccac5..2a555e2952 100644 --- a/modules/kameleonvolume/kameleonvolumereader.h +++ b/modules/kameleonvolume/kameleonvolumereader.h @@ -44,7 +44,7 @@ namespace openspace::kameleonvolume { class KameleonVolumeReader { public: - KameleonVolumeReader(std::filesystem::path path); + explicit KameleonVolumeReader(std::filesystem::path path); ~KameleonVolumeReader(); std::unique_ptr> readFloatVolume( diff --git a/modules/kameleonvolume/rendering/renderablekameleonvolume.h b/modules/kameleonvolume/rendering/renderablekameleonvolume.h index 9fda4a3c16..0b8e2e6279 100644 --- a/modules/kameleonvolume/rendering/renderablekameleonvolume.h +++ b/modules/kameleonvolume/rendering/renderablekameleonvolume.h @@ -49,7 +49,7 @@ namespace openspace::kameleonvolume { class RenderableKameleonVolume : public Renderable { public: - RenderableKameleonVolume(const ghoul::Dictionary& dictionary); + explicit RenderableKameleonVolume(const ghoul::Dictionary& dictionary); ~RenderableKameleonVolume(); void initializeGL() override; diff --git a/modules/kameleonvolume/tasks/kameleondocumentationtask.h b/modules/kameleonvolume/tasks/kameleondocumentationtask.h index 98174743ec..218b0dd684 100644 --- a/modules/kameleonvolume/tasks/kameleondocumentationtask.h +++ b/modules/kameleonvolume/tasks/kameleondocumentationtask.h @@ -34,7 +34,7 @@ namespace openspace::kameleonvolume { class KameleonDocumentationTask : public Task { public: - KameleonDocumentationTask(const ghoul::Dictionary& dictionary); + explicit KameleonDocumentationTask(const ghoul::Dictionary& dictionary); std::string description() override; void perform(const Task::ProgressCallback& progressCallback) override; diff --git a/modules/kameleonvolume/tasks/kameleonmetadatatojsontask.h b/modules/kameleonvolume/tasks/kameleonmetadatatojsontask.h index 89131673d4..b82aafa668 100644 --- a/modules/kameleonvolume/tasks/kameleonmetadatatojsontask.h +++ b/modules/kameleonvolume/tasks/kameleonmetadatatojsontask.h @@ -34,7 +34,7 @@ namespace openspace::kameleonvolume { class KameleonMetadataToJsonTask : public Task { public: - KameleonMetadataToJsonTask(const ghoul::Dictionary& dictionary); + explicit KameleonMetadataToJsonTask(const ghoul::Dictionary& dictionary); std::string description() override; void perform(const Task::ProgressCallback& progressCallback) override; diff --git a/modules/kameleonvolume/tasks/kameleonvolumetorawtask.h b/modules/kameleonvolume/tasks/kameleonvolumetorawtask.h index e807488a9b..c91b9e6901 100644 --- a/modules/kameleonvolume/tasks/kameleonvolumetorawtask.h +++ b/modules/kameleonvolume/tasks/kameleonvolumetorawtask.h @@ -35,7 +35,7 @@ namespace openspace::kameleonvolume { class KameleonVolumeToRawTask : public Task { public: - KameleonVolumeToRawTask(const ghoul::Dictionary& dictionary); + explicit KameleonVolumeToRawTask(const ghoul::Dictionary& dictionary); std::string description() override; void perform(const Task::ProgressCallback& progressCallback) override; diff --git a/modules/multiresvolume/rendering/atlasmanager.h b/modules/multiresvolume/rendering/atlasmanager.h index 73369ae0ee..e68de45c4e 100644 --- a/modules/multiresvolume/rendering/atlasmanager.h +++ b/modules/multiresvolume/rendering/atlasmanager.h @@ -45,7 +45,7 @@ public: ODD = 1 }; - AtlasManager(TSP* tsp); + explicit AtlasManager(TSP* tsp); ~AtlasManager() = default; void updateAtlas(BufferIndex bufferIndex, std::vector& brickIndices); diff --git a/modules/multiresvolume/rendering/brickcover.h b/modules/multiresvolume/rendering/brickcover.h index e72a912061..f0c25bc215 100644 --- a/modules/multiresvolume/rendering/brickcover.h +++ b/modules/multiresvolume/rendering/brickcover.h @@ -29,7 +29,7 @@ namespace openspace { struct BrickCover { BrickCover(); - BrickCover(int numBricks); + explicit BrickCover(int numBricks); BrickCover split(bool x, bool y, bool z) const; diff --git a/modules/multiresvolume/rendering/brickmanager.h b/modules/multiresvolume/rendering/brickmanager.h index 6ffd604b64..8269f46495 100644 --- a/modules/multiresvolume/rendering/brickmanager.h +++ b/modules/multiresvolume/rendering/brickmanager.h @@ -37,7 +37,7 @@ class BrickManager { public: enum BUFFER_INDEX { EVEN = 0, ODD = 1 }; - BrickManager(TSP* tsp); + explicit BrickManager(TSP* tsp); ~BrickManager(); bool readHeader(); diff --git a/modules/multiresvolume/rendering/errorhistogrammanager.h b/modules/multiresvolume/rendering/errorhistogrammanager.h index c7b0ea665b..50d69f9f89 100644 --- a/modules/multiresvolume/rendering/errorhistogrammanager.h +++ b/modules/multiresvolume/rendering/errorhistogrammanager.h @@ -37,7 +37,7 @@ class TSP; class ErrorHistogramManager { public: - ErrorHistogramManager(TSP* tsp); + explicit ErrorHistogramManager(TSP* tsp); ~ErrorHistogramManager() = default; bool buildHistograms(int numBins); diff --git a/modules/multiresvolume/rendering/localerrorhistogrammanager.h b/modules/multiresvolume/rendering/localerrorhistogrammanager.h index 8f9cd857cc..df0235e37b 100644 --- a/modules/multiresvolume/rendering/localerrorhistogrammanager.h +++ b/modules/multiresvolume/rendering/localerrorhistogrammanager.h @@ -37,7 +37,7 @@ class TSP; class LocalErrorHistogramManager { public: - LocalErrorHistogramManager(TSP* tsp); + explicit LocalErrorHistogramManager(TSP* tsp); bool buildHistograms(int numBins); const Histogram* spatialHistogram(unsigned int brickIndex) const; diff --git a/modules/multiresvolume/rendering/renderablemultiresvolume.h b/modules/multiresvolume/rendering/renderablemultiresvolume.h index 4c65ecab0c..9d2b79340d 100644 --- a/modules/multiresvolume/rendering/renderablemultiresvolume.h +++ b/modules/multiresvolume/rendering/renderablemultiresvolume.h @@ -58,7 +58,7 @@ class TSP; class RenderableMultiresVolume : public Renderable { public: - RenderableMultiresVolume(const ghoul::Dictionary& dictionary); + explicit RenderableMultiresVolume(const ghoul::Dictionary& dictionary); ~RenderableMultiresVolume(); enum Selector { diff --git a/modules/multiresvolume/rendering/tsp.h b/modules/multiresvolume/rendering/tsp.h index 8f144ad997..0cd2e247ed 100644 --- a/modules/multiresvolume/rendering/tsp.h +++ b/modules/multiresvolume/rendering/tsp.h @@ -56,7 +56,7 @@ public: NUM_DATA }; - TSP(const std::filesystem::path& filename); + explicit TSP(const std::filesystem::path& filename); ~TSP(); // load performs readHeader, readCache, writeCache and construct diff --git a/modules/server/include/connectionpool.h b/modules/server/include/connectionpool.h index 11780936b9..605152ecdc 100644 --- a/modules/server/include/connectionpool.h +++ b/modules/server/include/connectionpool.h @@ -41,7 +41,7 @@ class ConnectionPool { public: using SocketHandleFunc = std::function; - ConnectionPool(SocketHandleFunc handleSocket); + explicit ConnectionPool(SocketHandleFunc handleSocket); ~ConnectionPool(); void addServer(std::shared_ptr server); diff --git a/modules/server/include/serverinterface.h b/modules/server/include/serverinterface.h index ea509c0a53..33126b3117 100644 --- a/modules/server/include/serverinterface.h +++ b/modules/server/include/serverinterface.h @@ -41,7 +41,7 @@ public: static std::unique_ptr createFromDictionary( const ghoul::Dictionary& dictionary); - ServerInterface(const ghoul::Dictionary& dictionary); + explicit ServerInterface(const ghoul::Dictionary& dictionary); virtual ~ServerInterface() override = default; void initialize(); diff --git a/modules/server/include/topics/authorizationtopic.h b/modules/server/include/topics/authorizationtopic.h index 3fa3521eaa..89152361bb 100644 --- a/modules/server/include/topics/authorizationtopic.h +++ b/modules/server/include/topics/authorizationtopic.h @@ -31,7 +31,7 @@ namespace openspace { class AuthorizationTopic : public Topic { public: - AuthorizationTopic(std::string password); + explicit AuthorizationTopic(std::string password); void handleJson(const nlohmann::json& json) override; bool isDone() const override; diff --git a/modules/skybrowser/include/renderableskytarget.h b/modules/skybrowser/include/renderableskytarget.h index 7d76d0cd23..ef2147a114 100644 --- a/modules/skybrowser/include/renderableskytarget.h +++ b/modules/skybrowser/include/renderableskytarget.h @@ -60,6 +60,7 @@ public: void applyRoll(); glm::dvec3 rightVector() const; glm::dvec3 upVector() const; + private: properties::FloatProperty _crossHairSize; properties::FloatProperty _showRectangleThreshold; diff --git a/modules/space/horizonsfile.h b/modules/space/horizonsfile.h index 3090b079b2..238b7a7e0d 100644 --- a/modules/space/horizonsfile.h +++ b/modules/space/horizonsfile.h @@ -102,7 +102,7 @@ struct HorizonsResult { class HorizonsFile { public: HorizonsFile() = default; - HorizonsFile(std::filesystem::path file); + explicit HorizonsFile(std::filesystem::path file); HorizonsFile(std::filesystem::path filePath, std::string result); void setFile(std::filesystem::path file); diff --git a/modules/space/rendering/renderableconstellationbounds.h b/modules/space/rendering/renderableconstellationbounds.h index 94073a924c..17f3181c3e 100644 --- a/modules/space/rendering/renderableconstellationbounds.h +++ b/modules/space/rendering/renderableconstellationbounds.h @@ -45,7 +45,7 @@ namespace documentation { struct Documentation; } */ class RenderableConstellationBounds : public RenderableConstellationsBase { public: - RenderableConstellationBounds(const ghoul::Dictionary& dictionary); + explicit RenderableConstellationBounds(const ghoul::Dictionary& dictionary); void initialize() override; void initializeGL() override; diff --git a/modules/space/rendering/renderableeclipsecone.h b/modules/space/rendering/renderableeclipsecone.h index 2963f5da56..58f63dc668 100644 --- a/modules/space/rendering/renderableeclipsecone.h +++ b/modules/space/rendering/renderableeclipsecone.h @@ -46,7 +46,7 @@ struct UpdateData; class RenderableEclipseCone : public Renderable { public: - RenderableEclipseCone(const ghoul::Dictionary& dictionary); + explicit RenderableEclipseCone(const ghoul::Dictionary& dictionary); void initializeGL() override; void deinitializeGL() override; diff --git a/modules/space/rendering/renderablefluxnodes.h b/modules/space/rendering/renderablefluxnodes.h index 9a3318cb8d..986abe34b1 100644 --- a/modules/space/rendering/renderablefluxnodes.h +++ b/modules/space/rendering/renderablefluxnodes.h @@ -42,7 +42,7 @@ namespace openspace { class RenderableFluxNodes : public Renderable { public: - RenderableFluxNodes(const ghoul::Dictionary& dictionary); + explicit RenderableFluxNodes(const ghoul::Dictionary& dictionary); void initialize() override; void initializeGL() override; diff --git a/modules/space/rendering/renderablehabitablezone.h b/modules/space/rendering/renderablehabitablezone.h index 024595de4a..ef08893d9d 100644 --- a/modules/space/rendering/renderablehabitablezone.h +++ b/modules/space/rendering/renderablehabitablezone.h @@ -36,7 +36,7 @@ namespace documentation { struct Documentation; } class RenderableHabitableZone : public RenderableDisc { public: - RenderableHabitableZone(const ghoul::Dictionary& dictionary); + explicit RenderableHabitableZone(const ghoul::Dictionary& dictionary); void render(const RenderData& data, RendererTasks& rendererTask) override; diff --git a/modules/space/rendering/renderableorbitalkepler.h b/modules/space/rendering/renderableorbitalkepler.h index 4437646968..4608cd1716 100644 --- a/modules/space/rendering/renderableorbitalkepler.h +++ b/modules/space/rendering/renderableorbitalkepler.h @@ -42,7 +42,7 @@ namespace documentation { struct Documentation; } class RenderableOrbitalKepler : public Renderable { public: - RenderableOrbitalKepler(const ghoul::Dictionary& dictionary); + explicit RenderableOrbitalKepler(const ghoul::Dictionary& dictionary); void initializeGL() override; void deinitializeGL() override; diff --git a/modules/space/rendering/renderablerings.h b/modules/space/rendering/renderablerings.h index 9ff1a83ba6..bb8a1b9d16 100644 --- a/modules/space/rendering/renderablerings.h +++ b/modules/space/rendering/renderablerings.h @@ -46,7 +46,7 @@ namespace documentation { struct Documentation; } class RenderableRings : public Renderable { public: - RenderableRings(const ghoul::Dictionary& dictionary); + explicit RenderableRings(const ghoul::Dictionary& dictionary); void initializeGL() override; void deinitializeGL() override; diff --git a/modules/space/rendering/renderablestars.h b/modules/space/rendering/renderablestars.h index f91bca65a2..ce9c26815b 100644 --- a/modules/space/rendering/renderablestars.h +++ b/modules/space/rendering/renderablestars.h @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include diff --git a/modules/space/rendering/renderabletravelspeed.h b/modules/space/rendering/renderabletravelspeed.h index 9b03d9b460..89a3cd3725 100644 --- a/modules/space/rendering/renderabletravelspeed.h +++ b/modules/space/rendering/renderabletravelspeed.h @@ -40,7 +40,7 @@ namespace documentation { struct Documentation; } class RenderableTravelSpeed : public Renderable { public: - RenderableTravelSpeed(const ghoul::Dictionary& dictionary); + explicit RenderableTravelSpeed(const ghoul::Dictionary& dictionary); static documentation::Documentation Documentation(); void initializeGL() override; diff --git a/modules/space/rotation/spicerotation.h b/modules/space/rotation/spicerotation.h index 76ded57030..a56bf7b63b 100644 --- a/modules/space/rotation/spicerotation.h +++ b/modules/space/rotation/spicerotation.h @@ -37,7 +37,7 @@ namespace documentation { struct Documentation; } class SpiceRotation : public Rotation { public: - SpiceRotation(const ghoul::Dictionary& dictionary); + explicit SpiceRotation(const ghoul::Dictionary& dictionary); const glm::dmat3& matrix() const; glm::dmat3 matrix(const UpdateData& data) const override; diff --git a/modules/space/translation/horizonstranslation.h b/modules/space/translation/horizonstranslation.h index 8f18395642..2ff5666881 100644 --- a/modules/space/translation/horizonstranslation.h +++ b/modules/space/translation/horizonstranslation.h @@ -70,7 +70,7 @@ namespace documentation { struct Documentation; } class HorizonsTranslation : public Translation { public: HorizonsTranslation(); - HorizonsTranslation(const ghoul::Dictionary& dictionary); + explicit HorizonsTranslation(const ghoul::Dictionary& dictionary); glm::dvec3 position(const UpdateData& data) const override; diff --git a/modules/space/translation/keplertranslation.h b/modules/space/translation/keplertranslation.h index 2f00c28da5..e9cf997784 100644 --- a/modules/space/translation/keplertranslation.h +++ b/modules/space/translation/keplertranslation.h @@ -58,7 +58,7 @@ public: * \param dictionary The ghoul::Dictionary containing all the information about the * Keplerian elements (see Documentation) */ - KeplerTranslation(const ghoul::Dictionary& dictionary); + explicit KeplerTranslation(const ghoul::Dictionary& dictionary); /// Default destructor ~KeplerTranslation() override = default; diff --git a/modules/space/translation/spicetranslation.h b/modules/space/translation/spicetranslation.h index fe19842d35..79f94da7d7 100644 --- a/modules/space/translation/spicetranslation.h +++ b/modules/space/translation/spicetranslation.h @@ -34,7 +34,7 @@ namespace openspace { class SpiceTranslation : public Translation { public: - SpiceTranslation(const ghoul::Dictionary& dictionary); + explicit SpiceTranslation(const ghoul::Dictionary& dictionary); glm::dvec3 position(const UpdateData& data) const override; diff --git a/modules/spacecraftinstruments/dashboard/dashboarditeminstruments.h b/modules/spacecraftinstruments/dashboard/dashboarditeminstruments.h index 952bc80163..0ea94060b8 100644 --- a/modules/spacecraftinstruments/dashboard/dashboarditeminstruments.h +++ b/modules/spacecraftinstruments/dashboard/dashboarditeminstruments.h @@ -35,7 +35,7 @@ namespace openspace { class DashboardItemInstruments : public DashboardTextItem { public: - DashboardItemInstruments(const ghoul::Dictionary& dictionary); + explicit DashboardItemInstruments(const ghoul::Dictionary& dictionary); ~DashboardItemInstruments() override = default; void render(glm::vec2& penPosition) override; diff --git a/modules/spacecraftinstruments/rendering/renderablecrawlingline.h b/modules/spacecraftinstruments/rendering/renderablecrawlingline.h index bac3e5207e..7bd61247f1 100644 --- a/modules/spacecraftinstruments/rendering/renderablecrawlingline.h +++ b/modules/spacecraftinstruments/rendering/renderablecrawlingline.h @@ -36,7 +36,7 @@ namespace documentation { struct Documentation; } class RenderableCrawlingLine : public Renderable { public: - RenderableCrawlingLine(const ghoul::Dictionary& dictionary); + explicit RenderableCrawlingLine(const ghoul::Dictionary& dictionary); void initializeGL() override; void deinitializeGL() override; diff --git a/modules/spacecraftinstruments/rendering/renderablefov.h b/modules/spacecraftinstruments/rendering/renderablefov.h index 9c60b0d311..c84a5a1c6d 100644 --- a/modules/spacecraftinstruments/rendering/renderablefov.h +++ b/modules/spacecraftinstruments/rendering/renderablefov.h @@ -47,7 +47,7 @@ namespace documentation { struct Documentation; } class RenderableFov : public Renderable { public: - RenderableFov(const ghoul::Dictionary& dictionary); + explicit RenderableFov(const ghoul::Dictionary& dictionary); void initializeGL() override; void deinitializeGL() override; diff --git a/modules/spacecraftinstruments/rendering/renderablemodelprojection.h b/modules/spacecraftinstruments/rendering/renderablemodelprojection.h index 7549284b39..2150e146cc 100644 --- a/modules/spacecraftinstruments/rendering/renderablemodelprojection.h +++ b/modules/spacecraftinstruments/rendering/renderablemodelprojection.h @@ -50,7 +50,7 @@ struct UpdateData; class RenderableModelProjection : public Renderable { public: - RenderableModelProjection(const ghoul::Dictionary& dictionary); + explicit RenderableModelProjection(const ghoul::Dictionary& dictionary); ~RenderableModelProjection() override; void initializeGL() override; diff --git a/modules/spacecraftinstruments/rendering/renderableplaneprojection.h b/modules/spacecraftinstruments/rendering/renderableplaneprojection.h index 3ef58be89a..0562e53f4e 100644 --- a/modules/spacecraftinstruments/rendering/renderableplaneprojection.h +++ b/modules/spacecraftinstruments/rendering/renderableplaneprojection.h @@ -46,7 +46,7 @@ struct UpdateData; class RenderablePlaneProjection : public Renderable { public: - RenderablePlaneProjection(const ghoul::Dictionary& dictionary); + explicit RenderablePlaneProjection(const ghoul::Dictionary& dictionary); ~RenderablePlaneProjection() override = default; void initializeGL() override; diff --git a/modules/spacecraftinstruments/rendering/renderableplanetprojection.h b/modules/spacecraftinstruments/rendering/renderableplanetprojection.h index dbc7e7af8a..71b4e4b502 100644 --- a/modules/spacecraftinstruments/rendering/renderableplanetprojection.h +++ b/modules/spacecraftinstruments/rendering/renderableplanetprojection.h @@ -45,7 +45,7 @@ namespace planetgeometry { class PlanetGeometry; } class RenderablePlanetProjection : public Renderable { public: - RenderablePlanetProjection(const ghoul::Dictionary& dict); + explicit RenderablePlanetProjection(const ghoul::Dictionary& dict); ~RenderablePlanetProjection() override; void initializeGL() override; diff --git a/modules/spacecraftinstruments/rendering/renderableshadowcylinder.h b/modules/spacecraftinstruments/rendering/renderableshadowcylinder.h index c400abfc2f..5058b87970 100644 --- a/modules/spacecraftinstruments/rendering/renderableshadowcylinder.h +++ b/modules/spacecraftinstruments/rendering/renderableshadowcylinder.h @@ -46,7 +46,7 @@ struct UpdateData; class RenderableShadowCylinder : public Renderable { public: - RenderableShadowCylinder(const ghoul::Dictionary& dictionary); + explicit RenderableShadowCylinder(const ghoul::Dictionary& dictionary); void initializeGL() override; void deinitializeGL() override; diff --git a/modules/spacecraftinstruments/util/instrumentdecoder.h b/modules/spacecraftinstruments/util/instrumentdecoder.h index e7a40d3989..916a460c27 100644 --- a/modules/spacecraftinstruments/util/instrumentdecoder.h +++ b/modules/spacecraftinstruments/util/instrumentdecoder.h @@ -31,7 +31,7 @@ namespace openspace { class InstrumentDecoder : public Decoder { public: - InstrumentDecoder(const ghoul::Dictionary& dictionary); + explicit InstrumentDecoder(const ghoul::Dictionary& dictionary); virtual const std::string& decoderType() const override; virtual const std::vector& translations() const override; diff --git a/modules/spacecraftinstruments/util/scannerdecoder.h b/modules/spacecraftinstruments/util/scannerdecoder.h index 6c8d97a0ec..8fece01635 100644 --- a/modules/spacecraftinstruments/util/scannerdecoder.h +++ b/modules/spacecraftinstruments/util/scannerdecoder.h @@ -33,7 +33,7 @@ namespace openspace { class ScannerDecoder : public Decoder { public: - ScannerDecoder(const ghoul::Dictionary& dictionary); + explicit ScannerDecoder(const ghoul::Dictionary& dictionary); virtual const std::string& decoderType() const override; const std::vector& spiceIDs() const; diff --git a/modules/spacecraftinstruments/util/targetdecoder.h b/modules/spacecraftinstruments/util/targetdecoder.h index b76fa681b0..4d770f3e2e 100644 --- a/modules/spacecraftinstruments/util/targetdecoder.h +++ b/modules/spacecraftinstruments/util/targetdecoder.h @@ -31,7 +31,7 @@ namespace openspace { class TargetDecoder : public Decoder { public: - TargetDecoder(const ghoul::Dictionary& dictionary); + explicit TargetDecoder(const ghoul::Dictionary& dictionary); virtual const std::string& decoderType() const override; virtual const std::vector& translations() const override; diff --git a/modules/spout/renderableplanespout.h b/modules/spout/renderableplanespout.h index 90b1c5c9f7..34e212db68 100644 --- a/modules/spout/renderableplanespout.h +++ b/modules/spout/renderableplanespout.h @@ -37,7 +37,7 @@ namespace documentation { struct Documentation; } class RenderablePlaneSpout : public RenderablePlane { public: - RenderablePlaneSpout(const ghoul::Dictionary& dictionary); + explicit RenderablePlaneSpout(const ghoul::Dictionary& dictionary); void deinitializeGL() override; void update(const UpdateData& data) override; diff --git a/modules/spout/renderablespherespout.h b/modules/spout/renderablespherespout.h index d6433065c9..dd2fd65862 100644 --- a/modules/spout/renderablespherespout.h +++ b/modules/spout/renderablespherespout.h @@ -37,7 +37,7 @@ namespace documentation { struct Documentation; } class RenderableSphereSpout : public RenderableSphere { public: - RenderableSphereSpout(const ghoul::Dictionary& dictionary); + explicit RenderableSphereSpout(const ghoul::Dictionary& dictionary); void deinitializeGL() override; void update(const UpdateData& data) override; diff --git a/modules/spout/screenspacespout.h b/modules/spout/screenspacespout.h index 6fa6edb909..18b1f34b16 100644 --- a/modules/spout/screenspacespout.h +++ b/modules/spout/screenspacespout.h @@ -37,7 +37,7 @@ namespace documentation { struct Documentation; } class ScreenSpaceSpout : public ScreenSpaceRenderable { public: - ScreenSpaceSpout(const ghoul::Dictionary& dictionary); + explicit ScreenSpaceSpout(const ghoul::Dictionary& dictionary); bool deinitializeGL() override; diff --git a/modules/touch/include/win32_touch.h b/modules/touch/include/win32_touch.h index 93e3cd9024..7f488b1a75 100644 --- a/modules/touch/include/win32_touch.h +++ b/modules/touch/include/win32_touch.h @@ -31,7 +31,7 @@ namespace openspace { class Win32TouchHook { public: - Win32TouchHook(void* nativeWindow); + explicit Win32TouchHook(void* nativeWindow); ~Win32TouchHook(); }; diff --git a/modules/toyvolume/rendering/renderabletoyvolume.h b/modules/toyvolume/rendering/renderabletoyvolume.h index 0509606395..d0571b86db 100644 --- a/modules/toyvolume/rendering/renderabletoyvolume.h +++ b/modules/toyvolume/rendering/renderabletoyvolume.h @@ -38,7 +38,7 @@ struct RenderData; class RenderableToyVolume : public Renderable { public: - RenderableToyVolume(const ghoul::Dictionary& dictionary); + explicit RenderableToyVolume(const ghoul::Dictionary& dictionary); ~RenderableToyVolume() override; void initializeGL() override; diff --git a/modules/toyvolume/rendering/toyvolumeraycaster.h b/modules/toyvolume/rendering/toyvolumeraycaster.h index c50a5dd4bc..9ffe3e867a 100644 --- a/modules/toyvolume/rendering/toyvolumeraycaster.h +++ b/modules/toyvolume/rendering/toyvolumeraycaster.h @@ -43,7 +43,7 @@ struct RaycastData; class ToyVolumeRaycaster : public VolumeRaycaster { public: - ToyVolumeRaycaster(glm::vec4 color); + explicit ToyVolumeRaycaster(glm::vec4 color); ~ToyVolumeRaycaster() override = default; void initialize(); diff --git a/modules/video/include/renderablevideoplane.h b/modules/video/include/renderablevideoplane.h index 61dccc80d0..6ff607da55 100644 --- a/modules/video/include/renderablevideoplane.h +++ b/modules/video/include/renderablevideoplane.h @@ -35,7 +35,7 @@ namespace documentation { struct Documentation; } class RenderableVideoPlane : public RenderablePlane { public: - RenderableVideoPlane(const ghoul::Dictionary& dictionary); + explicit RenderableVideoPlane(const ghoul::Dictionary& dictionary); void initializeGL() override; void deinitializeGL() override; diff --git a/modules/video/include/renderablevideosphere.h b/modules/video/include/renderablevideosphere.h index e6819ca9d4..c9da8642e6 100644 --- a/modules/video/include/renderablevideosphere.h +++ b/modules/video/include/renderablevideosphere.h @@ -35,7 +35,7 @@ namespace documentation { struct Documentation; } class RenderableVideoSphere : public RenderableSphere { public: - RenderableVideoSphere(const ghoul::Dictionary& dictionary); + explicit RenderableVideoSphere(const ghoul::Dictionary& dictionary); void initializeGL() override; void deinitializeGL() override; diff --git a/modules/video/include/screenspacevideo.h b/modules/video/include/screenspacevideo.h index 3b61c6ba78..85aeffa2e8 100644 --- a/modules/video/include/screenspacevideo.h +++ b/modules/video/include/screenspacevideo.h @@ -38,7 +38,7 @@ namespace documentation { struct Documentation; } class ScreenSpaceVideo : public ScreenSpaceRenderable { public: - ScreenSpaceVideo(const ghoul::Dictionary& dictionary); + explicit ScreenSpaceVideo(const ghoul::Dictionary& dictionary); bool initializeGL() override; bool deinitializeGL() override; diff --git a/modules/video/include/videoplayer.h b/modules/video/include/videoplayer.h index eae37aca2b..4ceed5a47a 100644 --- a/modules/video/include/videoplayer.h +++ b/modules/video/include/videoplayer.h @@ -48,10 +48,10 @@ enum class PlaybackMode { }; class VideoPlayer : public properties::PropertyOwner, public Syncable { -BooleanType(PauseAfterSeek); - public: - VideoPlayer(const ghoul::Dictionary& dictionary); + BooleanType(PauseAfterSeek); + + explicit VideoPlayer(const ghoul::Dictionary& dictionary); ~VideoPlayer() override; void initialize(); diff --git a/modules/video/include/videotileprovider.h b/modules/video/include/videotileprovider.h index 25b5e812e6..b1690c99b4 100644 --- a/modules/video/include/videotileprovider.h +++ b/modules/video/include/videotileprovider.h @@ -43,7 +43,7 @@ namespace openspace::globebrowsing { class VideoTileProvider : public TileProvider { public: - VideoTileProvider(const ghoul::Dictionary& dictionary); + explicit VideoTileProvider(const ghoul::Dictionary& dictionary); ~VideoTileProvider() override; void update() override final; diff --git a/modules/volume/envelope.h b/modules/volume/envelope.h index ec1b598c77..3c4b32f4af 100644 --- a/modules/volume/envelope.h +++ b/modules/volume/envelope.h @@ -50,7 +50,7 @@ public: class Envelope { public: Envelope() = default; - Envelope(std::vector vec); + explicit Envelope(std::vector vec); void setPoints(std::vector vec); const std::vector& points() const; diff --git a/modules/volume/lrucache.h b/modules/volume/lrucache.h index 21cc6dd59a..e857efe991 100644 --- a/modules/volume/lrucache.h +++ b/modules/volume/lrucache.h @@ -38,7 +38,7 @@ template< > class LruCache { public: - LruCache(size_t capacity); + explicit LruCache(size_t capacity); bool has(const KeyType& key); void set(const KeyType& key, ValueType value); diff --git a/modules/volume/rawvolume.h b/modules/volume/rawvolume.h index cbfcf658c1..a2654295ae 100644 --- a/modules/volume/rawvolume.h +++ b/modules/volume/rawvolume.h @@ -36,7 +36,7 @@ class RawVolume { public: using VoxelType = Type; - RawVolume(const glm::uvec3& dimensions); + explicit RawVolume(const glm::uvec3& dimensions); glm::uvec3 dimensions() const; void setDimensions(const glm::uvec3& dimensions); diff --git a/modules/volume/rawvolumewriter.h b/modules/volume/rawvolumewriter.h index 04f1cce1c1..34c089097e 100644 --- a/modules/volume/rawvolumewriter.h +++ b/modules/volume/rawvolumewriter.h @@ -36,7 +36,7 @@ template class RawVolume; template class RawVolumeWriter { public: - RawVolumeWriter(std::filesystem::path path, size_t bufferSize = 1024); + explicit RawVolumeWriter(std::filesystem::path path, size_t bufferSize = 1024); void setPath(std::filesystem::path path); glm::uvec3 dimensions() const; diff --git a/modules/volume/rendering/renderabletimevaryingvolume.h b/modules/volume/rendering/renderabletimevaryingvolume.h index 25c01b3548..56f5816d44 100644 --- a/modules/volume/rendering/renderabletimevaryingvolume.h +++ b/modules/volume/rendering/renderabletimevaryingvolume.h @@ -48,7 +48,7 @@ class VolumeClipPlanes; class RenderableTimeVaryingVolume : public Renderable { public: - RenderableTimeVaryingVolume(const ghoul::Dictionary& dictionary); + explicit RenderableTimeVaryingVolume(const ghoul::Dictionary& dictionary); ~RenderableTimeVaryingVolume() override; void initializeGL() override; diff --git a/modules/volume/rendering/volumeclipplane.h b/modules/volume/rendering/volumeclipplane.h index 645aad16ea..352d932690 100644 --- a/modules/volume/rendering/volumeclipplane.h +++ b/modules/volume/rendering/volumeclipplane.h @@ -36,8 +36,9 @@ namespace openspace::volume { class VolumeClipPlane : public properties::PropertyOwner { public: - VolumeClipPlane(const ghoul::Dictionary& dictionary); + explicit VolumeClipPlane(const ghoul::Dictionary& dictionary); ~VolumeClipPlane() override = default; + glm::vec3 normal() const; glm::vec2 offsets() const; diff --git a/modules/volume/rendering/volumeclipplanes.h b/modules/volume/rendering/volumeclipplanes.h index 7a83d6672a..cd6d3e4626 100644 --- a/modules/volume/rendering/volumeclipplanes.h +++ b/modules/volume/rendering/volumeclipplanes.h @@ -39,7 +39,7 @@ class VolumeClipPlane; class VolumeClipPlanes : public properties::PropertyOwner { public: - VolumeClipPlanes(const ghoul::Dictionary& dictionary); + explicit VolumeClipPlanes(const ghoul::Dictionary& dictionary); ~VolumeClipPlanes() override = default; void initialize(); diff --git a/modules/volume/tasks/generaterawvolumefromfiletask.h b/modules/volume/tasks/generaterawvolumefromfiletask.h index aa19b8041f..4ec2c04199 100644 --- a/modules/volume/tasks/generaterawvolumefromfiletask.h +++ b/modules/volume/tasks/generaterawvolumefromfiletask.h @@ -35,9 +35,11 @@ namespace openspace::volume { class GenerateRawVolumeFromFileTask : public Task { public: - GenerateRawVolumeFromFileTask(const ghoul::Dictionary& dictionary); + explicit GenerateRawVolumeFromFileTask(const ghoul::Dictionary& dictionary); + std::string description() override; void perform(const Task::ProgressCallback& progressCallback) override; + static documentation::Documentation Documentation(); private: diff --git a/modules/volume/tasks/generaterawvolumetask.h b/modules/volume/tasks/generaterawvolumetask.h index 9886cdc995..4d06aef51a 100644 --- a/modules/volume/tasks/generaterawvolumetask.h +++ b/modules/volume/tasks/generaterawvolumetask.h @@ -35,9 +35,11 @@ namespace openspace::volume { class GenerateRawVolumeTask : public Task { public: - GenerateRawVolumeTask(const ghoul::Dictionary& dictionary); + explicit GenerateRawVolumeTask(const ghoul::Dictionary& dictionary); + std::string description() override; void perform(const Task::ProgressCallback& progressCallback) override; + static documentation::Documentation Documentation(); private: diff --git a/modules/volume/transferfunction.h b/modules/volume/transferfunction.h index 12e7b5d7d3..983e55b2ed 100644 --- a/modules/volume/transferfunction.h +++ b/modules/volume/transferfunction.h @@ -36,7 +36,7 @@ namespace openspace::volume { class TransferFunction { public: TransferFunction() = default; - TransferFunction(const std::string& string); + explicit TransferFunction(const std::string& string); void envelopesToLua(lua_State* state) const; diff --git a/modules/volume/transferfunctionhandler.h b/modules/volume/transferfunctionhandler.h index 69f4d5181a..d07dceb6c2 100644 --- a/modules/volume/transferfunctionhandler.h +++ b/modules/volume/transferfunctionhandler.h @@ -44,7 +44,7 @@ class Envelope; class TransferFunctionHandler : public properties::PropertyOwner { public: - TransferFunctionHandler(properties::StringProperty prop); + explicit TransferFunctionHandler(properties::StringProperty prop); void initialize(); diff --git a/modules/volume/transferfunctionproperty.h b/modules/volume/transferfunctionproperty.h index 931e670182..86e40b3163 100644 --- a/modules/volume/transferfunctionproperty.h +++ b/modules/volume/transferfunctionproperty.h @@ -32,7 +32,7 @@ namespace openspace::properties { class TransferFunctionProperty : public TemplateProperty { public: - TransferFunctionProperty(Property::PropertyInfo info, + explicit TransferFunctionProperty(Property::PropertyInfo info, volume::TransferFunction value = volume::TransferFunction()); std::string_view className() const override; diff --git a/modules/webbrowser/include/cefhost.h b/modules/webbrowser/include/cefhost.h index e4eb66348f..70f49a5a70 100644 --- a/modules/webbrowser/include/cefhost.h +++ b/modules/webbrowser/include/cefhost.h @@ -45,8 +45,9 @@ namespace openspace { class CefHost { public: - CefHost(const std::string& helperLocation); + explicit CefHost(const std::string& helperLocation); ~CefHost(); + void doMessageLoopWork(); private: diff --git a/modules/webbrowser/include/screenspacebrowser.h b/modules/webbrowser/include/screenspacebrowser.h index 126f4fa61e..6d2ab933e2 100644 --- a/modules/webbrowser/include/screenspacebrowser.h +++ b/modules/webbrowser/include/screenspacebrowser.h @@ -62,7 +62,7 @@ class WebKeyboardHandler; class ScreenSpaceBrowser : public ScreenSpaceRenderable { public: - ScreenSpaceBrowser(const ghoul::Dictionary& dictionary); + explicit ScreenSpaceBrowser(const ghoul::Dictionary& dictionary); ~ScreenSpaceBrowser() override = default; bool initializeGL() override; diff --git a/modules/webbrowser/include/webrenderhandler.h b/modules/webbrowser/include/webrenderhandler.h index 7efad621bd..353b00b78c 100644 --- a/modules/webbrowser/include/webrenderhandler.h +++ b/modules/webbrowser/include/webrenderhandler.h @@ -53,7 +53,7 @@ class WebRenderHandler : public CefRenderHandler { public: // @TODO (ylvse 2024-08-20): Remove this argument when the skybrowser rewrite is done. // It is necessary atm for making the skybrowser work. - WebRenderHandler(bool accelerate = true); + explicit WebRenderHandler(bool accelerate = true); using Pixel = glm::tvec4; virtual void draw(void) = 0; diff --git a/modules/webgui/webguimodule.h b/modules/webgui/webguimodule.h index 3c824b5143..6f94d4f3c4 100644 --- a/modules/webgui/webguimodule.h +++ b/modules/webgui/webguimodule.h @@ -44,6 +44,7 @@ public: using EndpointCallback = std::function; static constexpr const char* Name = "WebGui"; + WebGuiModule(); int port() const; std::string address() const; diff --git a/src/mission/missionmanager_lua.inl b/src/mission/missionmanager_lua.inl index a54fba4b0f..d89895e679 100644 --- a/src/mission/missionmanager_lua.inl +++ b/src/mission/missionmanager_lua.inl @@ -27,7 +27,7 @@ // Load mission phases from file. [[codegen::luawrap]] void loadMission(ghoul::Dictionary mission) { // TODO: Check if mission table is valid - openspace::global::missionManager->loadMission(mission); + openspace::global::missionManager->loadMission(openspace::Mission(mission)); } // Unloads a previously loaded mission.