diff --git a/ext/ghoul b/ext/ghoul index 38ef288aa1..d270feeebe 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit 38ef288aa14d9ee54dbc68c77703c8638215726f +Subproject commit d270feeebe23e66c7ae500d8162654495fb38d22 diff --git a/include/openspace/util/syncbuffer.h b/include/openspace/util/syncbuffer.h index e3954d5202..2503f79090 100644 --- a/include/openspace/util/syncbuffer.h +++ b/include/openspace/util/syncbuffer.h @@ -48,7 +48,7 @@ public: ~SyncBuffer(); void encode(const std::string& s) { - const size_t size = sizeof(char) * s.size() + sizeof(int32_t); + [[ maybe_unused ]] size_t size = sizeof(char) * s.size() + sizeof(int32_t); ghoul_assert(_encodeOffset + size < _n, ""); int32_t length = static_cast(s.length()); diff --git a/modules/globebrowsing/globebrowsingmodule.cpp b/modules/globebrowsing/globebrowsingmodule.cpp index 6f457579a7..4228b58cfa 100644 --- a/modules/globebrowsing/globebrowsingmodule.cpp +++ b/modules/globebrowsing/globebrowsingmodule.cpp @@ -53,6 +53,8 @@ #include #include +#include + #ifdef GLOBEBROWSING_USE_GDAL #include @@ -308,9 +310,6 @@ scripting::LuaLibrary GlobeBrowsingModule::luaLibrary() const { }, { absPath("${MODULE_GLOBEBROWSING}/scripts/layer_support.lua") - }, - { - // Documentation } }; } diff --git a/modules/spacecraftinstruments/util/projectioncomponent.cpp b/modules/spacecraftinstruments/util/projectioncomponent.cpp index c53b48c882..9777da8049 100644 --- a/modules/spacecraftinstruments/util/projectioncomponent.cpp +++ b/modules/spacecraftinstruments/util/projectioncomponent.cpp @@ -295,7 +295,7 @@ void ProjectionComponent::initialize(const ghoul::Dictionary& dictionary) { ghoul::Dictionary sourcesDict = dictionary.value( keySequenceDir ); - for (int i = 1; i <= sourcesDict.size(); ++i) { + for (int i = 1; i <= static_cast(sourcesDict.size()); ++i) { sequenceSources.push_back( absPath(sourcesDict.value(std::to_string(i))) ); diff --git a/modules/sync/syncs/httpsynchronization.cpp b/modules/sync/syncs/httpsynchronization.cpp index 1fa36c8d2e..011e164a84 100644 --- a/modules/sync/syncs/httpsynchronization.cpp +++ b/modules/sync/syncs/httpsynchronization.cpp @@ -40,7 +40,6 @@ #include namespace { - constexpr const char* _loggerCat = "HttpSynchronization"; constexpr const char* KeyIdentifier = "Identifier"; constexpr const char* KeyVersion = "Version"; diff --git a/modules/sync/torrentclient.cpp b/modules/sync/torrentclient.cpp index b4188f3420..a911f6bc24 100644 --- a/modules/sync/torrentclient.cpp +++ b/modules/sync/torrentclient.cpp @@ -31,7 +31,7 @@ namespace { const char* _loggerCat = "TorrentClient"; std::chrono::milliseconds PollInterval(200); -} +} // namespace namespace openspace { TorrentError::TorrentError(std::string component) @@ -69,7 +69,7 @@ void TorrentClient::initialize() { std::to_string(openspace::OPENSPACE_VERSION_PATCH)); settings.set_bool(libtorrent::settings_pack::allow_multiple_connections_per_ip, true); - settings.set_bool(libtorrent::settings_pack::ignore_limits_on_local_network, true); + //settings.set_bool(libtorrent::settings_pack::ignore_limits_on_local_network, true); settings.set_int(libtorrent::settings_pack::connection_speed, 20); settings.set_int(libtorrent::settings_pack::active_downloads, -1); settings.set_int(libtorrent::settings_pack::active_seeds, -1); diff --git a/src/engine/openspaceengine.cpp b/src/engine/openspaceengine.cpp index e265df8b3f..c4487edf85 100644 --- a/src/engine/openspaceengine.cpp +++ b/src/engine/openspaceengine.cpp @@ -849,7 +849,7 @@ void OpenSpaceEngine::runGlobalCustomizationScripts(const std::string& sceneDesc std::string k = ConfigurationManager::KeyGlobalCustomizationScripts; if (_configurationManager->hasKey(k)) { ghoul::Dictionary dict = _configurationManager->value(k); - for (int i = 1; i <= dict.size(); ++i) { + for (int i = 1; i <= static_cast(dict.size()); ++i) { std::string script = absPath(dict.value(std::to_string(i))); if (FileSys.fileExists(script)) { diff --git a/src/engine/settingsengine.cpp b/src/engine/settingsengine.cpp index 78ace0e8ea..4127dff04c 100644 --- a/src/engine/settingsengine.cpp +++ b/src/engine/settingsengine.cpp @@ -68,7 +68,7 @@ void SettingsEngine::initialize() { const std::size_t found = scenes[i].find_last_of("/\\"); _scenes.addOption(static_cast(i), scenes[i].substr(found + 1)); } - _scenes.addOption(scenes.size(), "None"); + _scenes.addOption(static_cast(scenes.size()), "None"); // Set interaction to change ConfigurationManager and schedule the load _scenes.onChange([this, nScenes, sceneDir]() { diff --git a/src/rendering/dashboard.cpp b/src/rendering/dashboard.cpp index 82a4dc6971..c6789f1585 100644 --- a/src/rendering/dashboard.cpp +++ b/src/rendering/dashboard.cpp @@ -62,17 +62,17 @@ void Dashboard::addDashboardItem(std::unique_ptr item) { } void Dashboard::removeDashboardItem(int index) { - ghoul_assert(index < _items.size(), "Invalid index"); + ghoul_assert(index < static_cast(_items.size()), "Invalid index"); removePropertySubOwner(_items[index].get()); _items.erase(_items.begin() + index); } bool Dashboard::hasItem(int index) const { - return (index >= 0) && (index < _items.size()); + return (index >= 0) && (index < static_cast(_items.size())); } const DashboardItem& Dashboard::item(int index) const { - ghoul_assert(index < _items.size(), "Invalid index"); + ghoul_assert(index < static_cast(_items.size()), "Invalid index"); return *_items[index]; } diff --git a/src/scene/scene.cpp b/src/scene/scene.cpp index 47ab6ca9b1..d07ecb68de 100644 --- a/src/scene/scene.cpp +++ b/src/scene/scene.cpp @@ -58,6 +58,7 @@ #include #include #include +#include #include "scene_lua.inl" @@ -89,8 +90,8 @@ Scene::Scene(std::unique_ptr initializer) }, "${WEB}/properties/script.js" ) - , _initializer(std::move(initializer)) , _dirtyNodeRegistry(false) + , _initializer(std::move(initializer)) { _rootDummy.setName(SceneGraphNode::RootNodeName); _rootDummy.setScene(this); diff --git a/src/scene/scenegraphnode.cpp b/src/scene/scenegraphnode.cpp index 7b29d0ebcc..981947fc02 100644 --- a/src/scene/scenegraphnode.cpp +++ b/src/scene/scenegraphnode.cpp @@ -335,7 +335,6 @@ void SceneGraphNode::update(const UpdateData& data) { } void SceneGraphNode::render(const RenderData& data, RendererTasks& tasks) { - State s = _state; if (_state != State::GLInitialized) { return; } diff --git a/src/scene/sceneinitializer.cpp b/src/scene/sceneinitializer.cpp index e812508f5d..403c0ae140 100644 --- a/src/scene/sceneinitializer.cpp +++ b/src/scene/sceneinitializer.cpp @@ -29,10 +29,6 @@ #include -namespace { - const char* _loggerCat = "SceneInitializer"; -} - namespace openspace { void SingleThreadedSceneInitializer::initializeNode(SceneGraphNode* node) { diff --git a/src/util/resourcesynchronization.cpp b/src/util/resourcesynchronization.cpp index b5410a13b8..422664192a 100644 --- a/src/util/resourcesynchronization.cpp +++ b/src/util/resourcesynchronization.cpp @@ -36,9 +36,9 @@ #include namespace { - constexpr char* KeyType = "Type"; - constexpr char* KeyName = "Name"; - constexpr char* _loggerCat = "ResourceSynchronization"; + constexpr const char* KeyType = "Type"; + constexpr const char* KeyName = "Name"; + constexpr const char* _loggerCat = "ResourceSynchronization"; } namespace openspace {