diff --git a/apps/OpenSpace/ext/launcher/src/launcherwindow.cpp b/apps/OpenSpace/ext/launcher/src/launcherwindow.cpp index 1c8305ad93..2b9750e089 100644 --- a/apps/OpenSpace/ext/launcher/src/launcherwindow.cpp +++ b/apps/OpenSpace/ext/launcher/src/launcherwindow.cpp @@ -45,8 +45,6 @@ using namespace openspace; namespace { - constexpr std::string_view _loggerCat = "LauncherWindow"; - constexpr int ScreenWidth = 480; constexpr int ScreenHeight = 640; @@ -598,7 +596,7 @@ void LauncherWindow::openProfileEditor(const std::string& profile, bool isUserPr connect( &editor, &ProfileEdit::raiseExitWindow, - [this, &editor, &savePath, &p, &profile]() { + [&editor, &savePath, &p, &profile]() { const std::string origPath = std::format("{}{}.profile", savePath, profile); // If this is a new profile we want to prompt the user if (!std::filesystem::exists(origPath)) { diff --git a/apps/OpenSpace/ext/launcher/src/sgctedit/windowcontrol.cpp b/apps/OpenSpace/ext/launcher/src/sgctedit/windowcontrol.cpp index f98cbbd5f8..96fa09ded0 100644 --- a/apps/OpenSpace/ext/launcher/src/sgctedit/windowcontrol.cpp +++ b/apps/OpenSpace/ext/launcher/src/sgctedit/windowcontrol.cpp @@ -108,7 +108,7 @@ namespace { [quality](const std::pair& p) { return p.first == quality; } ); ghoul_assert(it != Quality.cend(), "Combobox has too many values"); - return std::distance(Quality.cbegin(), it); + return static_cast(std::distance(Quality.cbegin(), it)); } } // namespace diff --git a/apps/OpenSpace/ext/sgct b/apps/OpenSpace/ext/sgct index 7554d35656..0713669107 160000 --- a/apps/OpenSpace/ext/sgct +++ b/apps/OpenSpace/ext/sgct @@ -1 +1 @@ -Subproject commit 7554d356569f397645c1e46230f8b87706995913 +Subproject commit 0713669107747ea7669b2e98a95fed16990d8ee5 diff --git a/ext/ghoul b/ext/ghoul index 56b44bb4b2..ea131fef1b 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit 56b44bb4b212a595edbb28dba9caa26ceae43016 +Subproject commit ea131fef1b4058668fae2c92786f31a38ff04906 diff --git a/include/openspace/interaction/sessionrecordinghandler.h b/include/openspace/interaction/sessionrecordinghandler.h index c4e1432c9b..3a92fe3c63 100644 --- a/include/openspace/interaction/sessionrecordinghandler.h +++ b/include/openspace/interaction/sessionrecordinghandler.h @@ -244,7 +244,7 @@ private: void cleanUpTimelinesAndKeyframes(); - void checkIfScriptUsesScenegraphNode(std::string_view s) const; + void checkIfScriptUsesScenegraphNode(std::string_view script) const; properties::BoolProperty _renderPlaybackInformation; diff --git a/include/openspace/properties/triggerproperty.h b/include/openspace/properties/triggerproperty.h index 957a8f742e..eb456c3ed8 100644 --- a/include/openspace/properties/triggerproperty.h +++ b/include/openspace/properties/triggerproperty.h @@ -61,7 +61,7 @@ public: */ void setLuaValue(lua_State* state) override; - ghoul::lua::LuaTypes typeLua() const; + ghoul::lua::LuaTypes typeLua() const override; /** * Triggers this TriggerProperty. diff --git a/include/openspace/util/keys.h b/include/openspace/util/keys.h index efeb1add8c..0b27f262e4 100644 --- a/include/openspace/util/keys.h +++ b/include/openspace/util/keys.h @@ -389,6 +389,8 @@ constexpr std::array KeyInfos = { struct KeyWithModifier { Key key = Key::Unknown; KeyModifier modifier = KeyModifier::None; + + auto operator<=>(const KeyWithModifier&) const = default; }; constexpr inline bool isKeypadKey(Key key) noexcept { @@ -403,22 +405,6 @@ constexpr inline bool isKeypadKey(Key key) noexcept { KeyWithModifier stringToKey(const std::string& str); std::string keyToString(KeyWithModifier keyWithModifier); -// @TODO (abock, 2021-08-12) This function should die -constexpr bool operator<(const KeyWithModifier& lhs, const KeyWithModifier& rhs) noexcept -{ - if (lhs.modifier == rhs.modifier) { - return lhs.key < rhs.key; - } - else { - return lhs.modifier < rhs.modifier; - } -} - -constexpr bool operator==(const KeyWithModifier& lhs, const KeyWithModifier& rhs) noexcept -{ - return (lhs.key == rhs.key) && (lhs.modifier == rhs.modifier); -} - } // namespace openspace namespace ghoul { diff --git a/modules/audio/CMakeLists.txt b/modules/audio/CMakeLists.txt index 65310c4fa6..376aac3743 100644 --- a/modules/audio/CMakeLists.txt +++ b/modules/audio/CMakeLists.txt @@ -49,7 +49,7 @@ if (WIN32) elseif (UNIX) set(SOLOUD_BACKEND_ALSA ON CACHE BOOL "") endif () -add_subdirectory(ext/soloud/contrib) +add_subdirectory(ext/soloud/contrib SYSTEM) # Unfortunately, the soloud cmake tarket doesn't set the include directories correctly target_include_directories(openspace-module-audio SYSTEM PRIVATE ext/soloud/include) diff --git a/modules/base/dashboard/dashboarditemparallelconnection.cpp b/modules/base/dashboard/dashboarditemparallelconnection.cpp index 7c088495cb..e2d78bb685 100644 --- a/modules/base/dashboard/dashboarditemparallelconnection.cpp +++ b/modules/base/dashboard/dashboarditemparallelconnection.cpp @@ -55,8 +55,6 @@ void DashboardItemParallelConnection::update() { const size_t nConnections = global::parallelPeer->nConnections(); const std::string& hostName = global::parallelPeer->hostName(); - int nLines = 1; - int nClients = static_cast(nConnections); if (status == ParallelConnection::Status::Host) { nClients--; @@ -92,8 +90,6 @@ void DashboardItemParallelConnection::update() { else if (nClients == 1) { _buffer += "You are the only client"; } - - nLines = 2; } } diff --git a/modules/base/rendering/pointcloud/renderableinterpolatedpoints.cpp b/modules/base/rendering/pointcloud/renderableinterpolatedpoints.cpp index f4e965b070..12009b974c 100644 --- a/modules/base/rendering/pointcloud/renderableinterpolatedpoints.cpp +++ b/modules/base/rendering/pointcloud/renderableinterpolatedpoints.cpp @@ -54,7 +54,7 @@ namespace { .synchronized = scripting::ScriptEngine::Script::ShouldBeSynchronized::No, .sendToRemote = scripting::ScriptEngine::Script::ShouldSendToRemote::No }); - }; + } constexpr openspace::properties::Property::PropertyInfo InterpolationValueInfo = { "Value", diff --git a/modules/base/rendering/renderablelabel.cpp b/modules/base/rendering/renderablelabel.cpp index 85e57cf029..d8a1749775 100644 --- a/modules/base/rendering/renderablelabel.cpp +++ b/modules/base/rendering/renderablelabel.cpp @@ -253,11 +253,11 @@ documentation::Documentation RenderableLabel::Documentation() { RenderableLabel::RenderableLabel(const ghoul::Dictionary& dictionary) : Renderable(dictionary, { .automaticallyUpdateRenderBin = false }) , _blendMode(BlendModeInfo, properties::OptionProperty::DisplayType::Dropdown) + , _text(TextInfo, "") , _color(ColorInfo, glm::vec3(1.f), glm::vec3(0.f), glm::vec3(1.f)) , _fontSize(FontSizeInfo, 50.f, 1.f, 100.f) , _size(SizeInfo, 8.f, 0.5f, 30.f) , _minMaxSize(MinMaxSizeInfo, glm::ivec2(8, 20), glm::ivec2(0), glm::ivec2(100)) - , _text(TextInfo, "") , _enableFadingEffect(EnableFadingEffectInfo, false) , _fadeWidths(FadeWidthsInfo, glm::vec2(1.f), glm::vec2(0.f), glm::vec2(100.f)) , _fadeDistances(FadeDistancesInfo, glm::vec2(1.f), glm::vec2(0.f), glm::vec2(100.f)) diff --git a/modules/base/rendering/renderableplanetimevaryingimage.cpp b/modules/base/rendering/renderableplanetimevaryingimage.cpp index ed60dc3d2d..904085699b 100644 --- a/modules/base/rendering/renderableplanetimevaryingimage.cpp +++ b/modules/base/rendering/renderableplanetimevaryingimage.cpp @@ -38,7 +38,6 @@ #include namespace { - constexpr std::string_view KeyLazyLoading = "LazyLoading"; constexpr std::string_view _loggerCat = "RenderablePlaneTimeVaryingImage"; constexpr openspace::properties::Property::PropertyInfo SourceFolderInfo = { diff --git a/modules/fieldlinessequence/rendering/renderablefieldlinessequence.cpp b/modules/fieldlinessequence/rendering/renderablefieldlinessequence.cpp index e5c6c30a0c..613876590c 100644 --- a/modules/fieldlinessequence/rendering/renderablefieldlinessequence.cpp +++ b/modules/fieldlinessequence/rendering/renderablefieldlinessequence.cpp @@ -1201,7 +1201,7 @@ void RenderableFieldlinesSequence::updateVertexPositionBuffer() { ); glEnableVertexAttribArray(0); - glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, 0); + glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, nullptr); unbindGL(); } @@ -1226,7 +1226,7 @@ void RenderableFieldlinesSequence::updateVertexColorBuffer() { ); glEnableVertexAttribArray(1); - glVertexAttribPointer(1, 1, GL_FLOAT, GL_FALSE, 0, 0); + glVertexAttribPointer(1, 1, GL_FLOAT, GL_FALSE, 0, nullptr); unbindGL(); } @@ -1252,7 +1252,7 @@ void RenderableFieldlinesSequence::updateVertexMaskingBuffer() { ); glEnableVertexAttribArray(2); - glVertexAttribPointer(2, 1, GL_FLOAT, GL_FALSE, 0, 0); + glVertexAttribPointer(2, 1, GL_FLOAT, GL_FALSE, 0, nullptr); unbindGL(); } diff --git a/modules/gaia/tasks/readfitstask.cpp b/modules/gaia/tasks/readfitstask.cpp index 7ba2843dfa..16ddcdb3b1 100644 --- a/modules/gaia/tasks/readfitstask.cpp +++ b/modules/gaia/tasks/readfitstask.cpp @@ -38,8 +38,6 @@ #include namespace { - constexpr std::string_view KeyFilterColumnNames = "FilterColumnNames"; - constexpr std::string_view _loggerCat = "ReadFitsTask"; struct [[codegen::Dictionary(ReadFitsTask)]] Parameters { diff --git a/modules/galaxy/tasks/milkywaypointsconversiontask.cpp b/modules/galaxy/tasks/milkywaypointsconversiontask.cpp index e8d2170182..5043a444c7 100644 --- a/modules/galaxy/tasks/milkywaypointsconversiontask.cpp +++ b/modules/galaxy/tasks/milkywaypointsconversiontask.cpp @@ -93,7 +93,9 @@ void MilkywayPointsConversionTask::perform(const Task::ProgressCallback& progres documentation::Documentation MilkywayPointsConversionTask::Documentation() { return { "MilkywayPointsConversionTask", - "galaxy_milkywaypointsconversiontask" + "galaxy_milkywaypointsconversiontask", + "", + {} }; } diff --git a/modules/globebrowsing/src/tileprovider/spoutimageprovider.h b/modules/globebrowsing/src/tileprovider/spoutimageprovider.h index 8f13bf4464..31b185c83f 100644 --- a/modules/globebrowsing/src/tileprovider/spoutimageprovider.h +++ b/modules/globebrowsing/src/tileprovider/spoutimageprovider.h @@ -51,12 +51,11 @@ private: void internalDeinitialize() override final; std::array, 2> tileTexture; - std::array fbo = { 0, 0 }; std::array tiles; - #ifdef OPENSPACE_HAS_SPOUT + std::array fbo = { 0, 0 }; std::unique_ptr spoutReceiver; -#endif +#endif // OPENSPACE_HAS_SPOUT bool spoutUpdate = false; }; diff --git a/modules/globebrowsing/src/tileprovider/tileproviderbydate.cpp b/modules/globebrowsing/src/tileprovider/tileproviderbydate.cpp index 269624e609..e7d943f04a 100644 --- a/modules/globebrowsing/src/tileprovider/tileproviderbydate.cpp +++ b/modules/globebrowsing/src/tileprovider/tileproviderbydate.cpp @@ -66,7 +66,6 @@ TileProviderByDate::TileProviderByDate(const ghoul::Dictionary& dictionary) { if (dictionary.hasValue("GlobeName")) { prov.second.setValue("GlobeName", dictionary.value("GlobeName")); } - layers::Layer::ID typeID = layers::Layer::ID::DefaultTileProvider; std::unique_ptr tp = createFromDictionary(prov.second); const std::string provId = prov.second.value("Identifier"); diff --git a/modules/imgui/src/guimemorycomponent.cpp b/modules/imgui/src/guimemorycomponent.cpp index f65b17b990..9cba11e5a7 100644 --- a/modules/imgui/src/guimemorycomponent.cpp +++ b/modules/imgui/src/guimemorycomponent.cpp @@ -67,9 +67,9 @@ void GuiMemoryComponent::render() { _isCollapsed = ImGui::IsWindowCollapsed(); uint64_t ram = global::openSpaceEngine->ramInUse(); - ImGui::Text("RAM: %u (%f MiB)", ram, ram / (1024.f * 1024.f)); + ImGui::Text("RAM: %lu (%f MiB)", ram, ram / (1024.f * 1024.f)); uint64_t vram = global::openSpaceEngine->vramInUse(); - ImGui::Text("VRAM: %u (%f MiB)", vram, vram / (1024.f * 1024.f)); + ImGui::Text("VRAM: %lu (%f MiB)", vram, vram / (1024.f * 1024.f)); ImGui::Spacing(); diff --git a/modules/iswa/rendering/iswabasegroup.cpp b/modules/iswa/rendering/iswabasegroup.cpp index 6f1349fc6c..c3edc9ddde 100644 --- a/modules/iswa/rendering/iswabasegroup.cpp +++ b/modules/iswa/rendering/iswabasegroup.cpp @@ -60,7 +60,7 @@ IswaBaseGroup::IswaBaseGroup(std::string name, std::string type) , _enabled(EnabledInfo, true) , _alpha(AlphaInfo, 0.9f, 0.f, 1.f) , _delete(DeleteInfo) - , _type(std::move(type)) + , _iswaType(std::move(type)) { addProperty(_enabled); addProperty(_alpha); @@ -72,7 +72,7 @@ IswaBaseGroup::IswaBaseGroup(std::string name, std::string type) IswaBaseGroup::~IswaBaseGroup() {} bool IswaBaseGroup::isType(const std::string& type) const { - return (_type == type); + return (_iswaType == type); } void IswaBaseGroup::updateGroup() { diff --git a/modules/iswa/rendering/iswabasegroup.h b/modules/iswa/rendering/iswabasegroup.h index 023091b69c..f378494e9c 100644 --- a/modules/iswa/rendering/iswabasegroup.h +++ b/modules/iswa/rendering/iswabasegroup.h @@ -61,7 +61,8 @@ protected: std::shared_ptr _dataProcessor; bool _registered = false; - std::string _type; +private: + std::string _iswaType; }; } //namespace openspace diff --git a/modules/iswa/util/iswamanager.cpp b/modules/iswa/util/iswamanager.cpp index cd815e118e..9801bdcfab 100644 --- a/modules/iswa/util/iswamanager.cpp +++ b/modules/iswa/util/iswamanager.cpp @@ -101,9 +101,9 @@ IswaManager::IswaManager() : properties::PropertyOwner({ "IswaManager", "Iswa Manager" }) , _baseUrl("https://iswa-demo-server.herokuapp.com/") { - _type[CygnetType::Texture] = "Texture"; - _type[CygnetType::Data] = "Data"; - _type[CygnetType::Kameleon] = "Kameleon"; + _cygnetType[CygnetType::Texture] = "Texture"; + _cygnetType[CygnetType::Data] = "Data"; + _cygnetType[CygnetType::Kameleon] = "Kameleon"; _geom[CygnetGeometry::Plane] = "Plane"; _geom[CygnetGeometry::Sphere] = "Sphere"; @@ -124,7 +124,6 @@ IswaManager::~IswaManager() { _cygnetInformation.clear(); } - void IswaManager::initialize() { ghoul_assert(!isInitialized(), "IswaManager is already initialized"); _instance = new IswaManager; @@ -156,10 +155,10 @@ void IswaManager::addIswaCygnet(int id, const std::string& type, std::string gro metaFuture.group = std::move(group); // Assign type of cygnet Texture/Data - if (type == _type[CygnetType::Texture]) { + if (type == _cygnetType[CygnetType::Texture]) { metaFuture.type = CygnetType::Texture; } - else if (type == _type[CygnetType::Data]) { + else if (type == _cygnetType[CygnetType::Data]) { metaFuture.type = CygnetType::Data; } else { @@ -389,7 +388,7 @@ std::string IswaManager::jsonPlaneToLuaTable(MetadataFuture& data) { "Name = '" + data.name +"' , " "Parent = '" + parent + "', " "Renderable = {" - "Type = '" + _type[data.type] + _geom[data.geom] + "', " + "Type = '" + _cygnetType[data.type] + _geom[data.geom] + "', " "Id = " + ghoul::to_string(data.id) + ", " "Frame = '" + frame + "' , " "GridMin = " + ghoul::to_string(min) + ", " @@ -496,7 +495,7 @@ std::string IswaManager::jsonSphereToLuaTable(MetadataFuture& data) { "Name = '" + data.name +"' , " "Parent = '" + parent + "', " "Renderable = {" - "Type = '" + _type[data.type] + _geom[data.geom] + "', " + "Type = '" + _cygnetType[data.type] + _geom[data.geom] + "', " "Id = " + std::to_string(data.id) + ", " "Frame = '" + frame + "' , " "GridMin = " + ghoul::to_string(min) + ", " @@ -513,7 +512,9 @@ std::string IswaManager::jsonSphereToLuaTable(MetadataFuture& data) { void IswaManager::createPlane(MetadataFuture& data) { // check if this plane already exist - std::string name = _type[data.type] + _geom[data.geom] + std::to_string(data.id); + std::string name = std::format( + "{}{}{}", _cygnetType[data.type], _geom[data.geom], data.id + ); if (!data.group.empty()) { std::string type; @@ -551,7 +552,9 @@ void IswaManager::createPlane(MetadataFuture& data) { void IswaManager::createSphere(MetadataFuture& data) { // check if this sphere already exist - std::string name = _type[data.type] + _geom[data.geom] + std::to_string(data.id); + std::string name = std::format( + "{}{}{}", _cygnetType[data.type], _geom[data.geom], data.id + ); if (!data.group.empty()) { std::string type = typeid(DataSphere).name(); diff --git a/modules/iswa/util/iswamanager.h b/modules/iswa/util/iswamanager.h index 7577d7928d..b07beda666 100644 --- a/modules/iswa/util/iswamanager.h +++ b/modules/iswa/util/iswamanager.h @@ -116,7 +116,7 @@ private: void fillCygnetInfo(std::string jsonString); void registerGroup(std::string groupName, std::string type); - std::map _type; + std::map _cygnetType; std::map _geom; std::shared_ptr _kameleon; diff --git a/modules/kameleon/ext/kameleon b/modules/kameleon/ext/kameleon index 33ae5e637d..eee25cf7f4 160000 --- a/modules/kameleon/ext/kameleon +++ b/modules/kameleon/ext/kameleon @@ -1 +1 @@ -Subproject commit 33ae5e637dc95437458c667817e93ef5411c9be1 +Subproject commit eee25cf7f4d06dc72fd057326cf6b337a4df8e24 diff --git a/modules/kameleonvolume/kameleonvolumereader.cpp b/modules/kameleonvolume/kameleonvolumereader.cpp index 4df74203a9..a0c6605881 100644 --- a/modules/kameleonvolume/kameleonvolumereader.cpp +++ b/modules/kameleonvolume/kameleonvolumereader.cpp @@ -54,8 +54,6 @@ #endif // WIN32 namespace { - constexpr std::string_view _loggerCat = "KameleonVolumeReader"; - template T globalAttribute(ccmc::Model&, const std::string&) { static_assert(sizeof(T) == 0); diff --git a/modules/multiresvolume/rendering/brickmanager.cpp b/modules/multiresvolume/rendering/brickmanager.cpp index 5f7f7d2923..66dc0d069e 100644 --- a/modules/multiresvolume/rendering/brickmanager.cpp +++ b/modules/multiresvolume/rendering/brickmanager.cpp @@ -162,21 +162,21 @@ bool BrickManager::buildBrickList(BUFFER_INDEX bufferIndex, { // Keep track of number bricks used and number of bricks cached // (for benchmarking) - int numBricks = 0; - int numCached = 0; + //int numBricks = 0; + //int numCached = 0; // For every non-zero entry in the request list, assign a texture atlas // coordinate. For zero entries, signal "no brick" using -1. for (unsigned int i = 0; i < brickRequest.size(); i++) { if (brickRequest[i] > 0) { - numBricks++; + //numBricks++; //INFO("Checking brick " << i); // If the brick is already in the atlas, keep the coordinate if (_bricksInPBO[bufferIndex][i] != -1) { - numCached++; + //numCached++; // Get the corresponding coordinates from index int x, y, z; diff --git a/modules/multiresvolume/rendering/brickselector.h b/modules/multiresvolume/rendering/brickselector.h index ff03dce50e..df7b31a7cf 100644 --- a/modules/multiresvolume/rendering/brickselector.h +++ b/modules/multiresvolume/rendering/brickselector.h @@ -31,8 +31,8 @@ namespace openspace { class BrickSelector { public: - virtual ~BrickSelector() {}; - virtual bool initialize() { return true; }; + virtual ~BrickSelector() {} + virtual bool initialize() { return true; } virtual void selectBricks(int timestep, std::vector& bricks) = 0; }; diff --git a/modules/multiresvolume/rendering/errorhistogrammanager.cpp b/modules/multiresvolume/rendering/errorhistogrammanager.cpp index 8e08484696..2017365154 100644 --- a/modules/multiresvolume/rendering/errorhistogrammanager.cpp +++ b/modules/multiresvolume/rendering/errorhistogrammanager.cpp @@ -96,7 +96,7 @@ bool ErrorHistogramManager::buildFromLeaf(unsigned int bstOffset, int bstNode = bstOffset; bool bstRightOnly = true; - unsigned int bstLevel = 0; + //unsigned int bstLevel = 0; do { glm::vec3 leafOffset(0.f); // Leaf offset in leaf sized voxels @@ -173,7 +173,7 @@ bool ErrorHistogramManager::buildFromLeaf(unsigned int bstOffset, bstRightOnly &= (bstNode % 2 == 0); bstNode = parentOffset(bstNode, 2); - bstLevel++; + //bstLevel++; } while (bstNode != -1); return true; diff --git a/modules/multiresvolume/rendering/multiresvolumeraycaster.cpp b/modules/multiresvolume/rendering/multiresvolumeraycaster.cpp index d31d424611..7ddb2c86aa 100644 --- a/modules/multiresvolume/rendering/multiresvolumeraycaster.cpp +++ b/modules/multiresvolume/rendering/multiresvolumeraycaster.cpp @@ -152,7 +152,7 @@ bool MultiresVolumeRaycaster::isCameraInside(const RenderData& data, float divisor = 1.0; for (int i = 0; i < 4; i++) for (int j = 0; j < 4; j++) { - if (abs(modelTransform[i][j]) > divisor) { + if (std::abs(modelTransform[i][j]) > divisor) { divisor = modelTransform[i][j]; } } diff --git a/modules/multiresvolume/rendering/tsp.cpp b/modules/multiresvolume/rendering/tsp.cpp index 0442573732..6b11623361 100644 --- a/modules/multiresvolume/rendering/tsp.cpp +++ b/modules/multiresvolume/rendering/tsp.cpp @@ -67,20 +67,20 @@ bool TSP::load() { return false; } - if (false) { - if (!calculateSpatialError()) { - LERROR("Could not calculate spatial error"); - return false; - } - if (!calculateTemporalError()) { - LERROR("Could not calculate temporal error"); - return false; - } - if (!writeCache()) { - LERROR("Could not write cache"); - return false; - } +#if 0 + if (!calculateSpatialError()) { + LERROR("Could not calculate spatial error"); + return false; } + if (!calculateTemporalError()) { + LERROR("Could not calculate temporal error"); + return false; + } + if (!writeCache()) { + LERROR("Could not write cache"); + return false; + } +#endif } initalizeSSO(); diff --git a/modules/space/translation/horizonstranslation.cpp b/modules/space/translation/horizonstranslation.cpp index a2c045af69..d2ea216c17 100644 --- a/modules/space/translation/horizonstranslation.cpp +++ b/modules/space/translation/horizonstranslation.cpp @@ -95,7 +95,7 @@ HorizonsTranslation::HorizonsTranslation(const ghoul::Dictionary& dictionary) files.cbegin(), files.cend(), std::back_inserter(f), - [](const std::filesystem::path& p) { return p.string(); } + [](const std::filesystem::path& path) { return path.string(); } ); _horizonsFiles = f; } diff --git a/modules/touch/src/touchinteraction.cpp b/modules/touch/src/touchinteraction.cpp index 802b9e53d2..f9b22f5977 100644 --- a/modules/touch/src/touchinteraction.cpp +++ b/modules/touch/src/touchinteraction.cpp @@ -323,13 +323,13 @@ TouchInteraction::TouchInteraction() glm::vec4(0.2f) ) , _constTimeDecay_secs(ConstantTimeDecaySecsInfo, 1.75f, 0.1f, 4.f) - , _pinchInputs({ TouchInput(0, 0, 0.f, 0.f, 0.0), TouchInput(0, 0, 0.f, 0.f, 0.0) }) - , _vel{ glm::dvec2(0.0), 0.0, 0.0, glm::dvec2(0.0) } - , _sensitivity{ glm::dvec2(0.08, 0.045), 12.0, 2.75, glm::dvec2(0.08, 0.045) } // Calculated with two vectors with known diff in length, then // projDiffLength/diffLength. , _enableDirectManipulation(EnableDirectManipulationInfo, true) , _directTouchDistanceThreshold(DirectManipulationThresholdInfo, 5.f, 0.f, 10.f) + , _pinchInputs({ TouchInput(0, 0, 0.f, 0.f, 0.0), TouchInput(0, 0, 0.f, 0.f, 0.0) }) + , _vel{ glm::dvec2(0.0), 0.0, 0.0, glm::dvec2(0.0) } + , _sensitivity{ glm::dvec2(0.08, 0.045), 12.0, 2.75, glm::dvec2(0.08, 0.045) } { addProperty(_disableZoom); addProperty(_disableRoll); @@ -796,17 +796,17 @@ void TouchInteraction::computeVelocities(const std::vector& li list.begin(), list.end(), 0.0, - [this, &lastProcessed](double diff, const TouchInputHolder& inputHolder) { + [this, &lastProcessed](double diff, const TouchInputHolder& holder) { TouchInput point = *std::find_if( lastProcessed.begin(), lastProcessed.end(), - [&inputHolder](const TouchInput& input) { - return inputHolder.holdsInput(input); + [&holder](const TouchInput& input) { + return holder.holdsInput(input); } ); double res = diff; float lastAngle = point.angleToPos(_centroid.x, _centroid.y); - float currentAngle = inputHolder.latestInput().angleToPos( + float currentAngle = holder.latestInput().angleToPos( _centroid.x, _centroid.y ); @@ -1210,7 +1210,11 @@ double FrameTimeAverage::averageFrameTime() const { return 1.0 / 60.0; } else { - return std::accumulate(_samples, _samples + _nSamples, 0.0) / (double)(_nSamples); + return std::accumulate( + _samples, + _samples + _nSamples, + 0.0 + ) / static_cast(_nSamples); } } diff --git a/modules/toyvolume/rendering/renderabletoyvolume.cpp b/modules/toyvolume/rendering/renderabletoyvolume.cpp index 0aa88ac8c9..f3eb5edde3 100644 --- a/modules/toyvolume/rendering/renderabletoyvolume.cpp +++ b/modules/toyvolume/rendering/renderabletoyvolume.cpp @@ -33,8 +33,6 @@ #include namespace { - constexpr std::string_view _loggerCat = "RenderableToyVolume"; - constexpr openspace::properties::Property::PropertyInfo SizeInfo = { "Size", "Size", diff --git a/modules/video/src/videoplayer.cpp b/modules/video/src/videoplayer.cpp index 62312b04fe..0f6d615e38 100644 --- a/modules/video/src/videoplayer.cpp +++ b/modules/video/src/videoplayer.cpp @@ -405,7 +405,9 @@ void VideoPlayer::initializeMpv() { LINFO("mpv init failed"); } - mpv_opengl_init_params gl_init_params { getOpenGLProcAddress, nullptr }; + mpv_opengl_init_params glInitParams; + glInitParams.get_proc_address = getOpenGLProcAddress; + glInitParams.get_proc_address_ctx = nullptr; int adv = 1; // Use libmpv advanced mode since we will use the update callback // Decouple mpv from waiting to get the correct fps. Use with flag video-timing-offset // set to 0 @@ -413,7 +415,7 @@ void VideoPlayer::initializeMpv() { mpv_render_param params[] = { { MPV_RENDER_PARAM_API_TYPE, const_cast(MPV_RENDER_API_TYPE_OPENGL) }, - { MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_init_params }, + { MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &glInitParams }, { MPV_RENDER_PARAM_ADVANCED_CONTROL, &adv }, { MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, &blockTime }, { MPV_RENDER_PARAM_INVALID, nullptr } diff --git a/modules/volume/tasks/generaterawvolumefromfiletask.cpp b/modules/volume/tasks/generaterawvolumefromfiletask.cpp index 71b82e687c..4d0df23cbc 100644 --- a/modules/volume/tasks/generaterawvolumefromfiletask.cpp +++ b/modules/volume/tasks/generaterawvolumefromfiletask.cpp @@ -144,7 +144,6 @@ void GenerateRawVolumeFromFileTask::perform(const ProgressCallback& progressCall progressCallback(0.5f); // Write data into volume data structure - int k = 0; for (const dataloader::Dataset::Entry& entry : data.entries) { // Get the closest i, j , k voxel that should contain this data glm::vec3 normalizedPos = (entry.position - _lowerDomainBound) / @@ -163,7 +162,6 @@ void GenerateRawVolumeFromFileTask::perform(const ProgressCallback& progressCall size_t index = rawVolume.coordsToIndex(cell); rawVolume.set(index, value); - k++; } progressCallback(0.75f); diff --git a/modules/webbrowser/include/webbrowserapp.h b/modules/webbrowser/include/webbrowserapp.h index 5c2942e111..5b55e93a1d 100644 --- a/modules/webbrowser/include/webbrowserapp.h +++ b/modules/webbrowser/include/webbrowserapp.h @@ -28,14 +28,29 @@ #ifdef _MSC_VER #pragma warning (push) #pragma warning (disable : 4100) -#endif // _MSC_VER +#elif defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments" +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wshadow-field" +#pragma clang diagnostic ignored "-Wcomma" +#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" +#elif defined(__GNUC__) || defined(__GNUG__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wshadow" +#endif #include #include #ifdef _MSC_VER #pragma warning (pop) -#endif // _MSC_VER +#elif defined(__clang__) +#pragma clang diagnostic pop +#elif defined(__GNUC__) || defined(__GNUG__) +#pragma GCC diagnostic pop +#endif + namespace openspace { diff --git a/modules/webbrowser/src/processhelperlinux.cpp b/modules/webbrowser/src/processhelperlinux.cpp index 58b05d86d9..54f04a5169 100644 --- a/modules/webbrowser/src/processhelperlinux.cpp +++ b/modules/webbrowser/src/processhelperlinux.cpp @@ -26,9 +26,27 @@ // reserved. Use of this source code is governed by a BSD-style license that can // be found in the LICENSE file. +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments" +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wshadow-field" +#pragma clang diagnostic ignored "-Wcomma" +#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" +#elif defined(__GNUC__) || defined(__GNUG__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wshadow" +#endif + #include "include/cef_app.h" #include "include/webbrowserapp.h" +#ifdef __clang__ +#pragma clang diagnostic pop +#elif defined(__GNUC__) || defined(__GNUG__) +#pragma GCC diagnostic pop +#endif + // Entry point function for all processes. int main(int argc, char* argv[]) { // Provide CEF with command-line arguments. diff --git a/src/interaction/keyframerecordinghandler.cpp b/src/interaction/keyframerecordinghandler.cpp index fea3d5733c..9ef0d345a9 100644 --- a/src/interaction/keyframerecordinghandler.cpp +++ b/src/interaction/keyframerecordinghandler.cpp @@ -30,10 +30,6 @@ #include "keyframerecordinghandler_lua.inl" -namespace { - constexpr std::string_view _loggerCat = "KeyframeRecording"; -} // namespace - namespace openspace::interaction { KeyframeRecordingHandler::KeyframeRecordingHandler() diff --git a/src/interaction/sessionrecording.cpp b/src/interaction/sessionrecording.cpp index acea0cff90..ca35eb9730 100644 --- a/src/interaction/sessionrecording.cpp +++ b/src/interaction/sessionrecording.cpp @@ -72,7 +72,6 @@ namespace { constexpr std::string_view FrameTypeCameraAscii = "camera"; constexpr std::string_view FrameTypeScriptAscii = "script"; - constexpr std::string_view FrameTypeCommentAscii = "#"; constexpr char FrameTypeCameraBinary = 'c'; constexpr char FrameTypeScriptBinary = 's'; @@ -180,6 +179,7 @@ namespace { template std::optional readFrameType(std::istream&, int) { static_assert(sizeof(int) == 0, "Unimplemented overload"); + return std::nullopt; } template <> diff --git a/src/interaction/sessionrecordinghandler.cpp b/src/interaction/sessionrecordinghandler.cpp index bd9305d6a0..c69075a13f 100644 --- a/src/interaction/sessionrecordinghandler.cpp +++ b/src/interaction/sessionrecordinghandler.cpp @@ -78,9 +78,6 @@ namespace { openspace::properties::Property::Visibility::Developer }; - const std::string FileExtensionBinary = ".osrec"; - const std::string FileExtensionAscii = ".osrectxt"; - constexpr std::string_view ScriptReturnPrefix = "return "; } // namespace @@ -111,7 +108,7 @@ void SessionRecordingHandler::preSynchronization(double dt) { if (_state != _lastState) { using K = CallbackHandle; using V = StateChangeCallback; - for (const std::pair& it : _stateChangeCallbacks) { + for (const std::pair& it : _stateChangeCallbacks) { it.second(); } _lastState = _state; @@ -450,8 +447,8 @@ void SessionRecordingHandler::seek(double recordingTime) { _timeline.entries.begin(), _timeline.entries.end(), recordingTime, - [](double recordingTime, const SessionRecording::Entry& e) { - return recordingTime < e.timestamp; + [](double rt, const SessionRecording::Entry& e) { + return rt < e.timestamp; } ); _playback.elapsedTime = recordingTime; @@ -633,7 +630,9 @@ double SessionRecordingHandler::currentApplicationInterpolationTime() const { return _playback.saveScreenshots.currentApplicationTime; } -void SessionRecordingHandler::checkIfScriptUsesScenegraphNode(std::string_view s) const { +void SessionRecordingHandler::checkIfScriptUsesScenegraphNode( + std::string_view script) const +{ auto isolateTermFromQuotes = [](std::string_view s) -> std::string_view { // Remove any leading spaces s.remove_prefix(s.find_first_not_of(" ")); @@ -660,26 +659,31 @@ void SessionRecordingHandler::checkIfScriptUsesScenegraphNode(std::string_view s "NavigationHandler.OrbitalNavigator.Aim" }; - for (std::string_view script : NavScriptsUsingNodes) { - if (navTerm.find(script) != std::string::npos) { + for (std::string_view s : NavScriptsUsingNodes) { + if (navTerm.find(s) != std::string::npos) { return true; } } return false; }; - if (s.starts_with(ScriptReturnPrefix)) { - s.remove_prefix(ScriptReturnPrefix.length()); + if (script.starts_with(ScriptReturnPrefix)) { + script.remove_prefix(ScriptReturnPrefix.length()); } // This works for both setPropertyValue and setPropertyValueSingle - if (!s.starts_with("openspace.setPropertyValue") || s.find('(') == std::string::npos) + if (!script.starts_with("openspace.setPropertyValue") || + script.find('(') == std::string::npos) { return; } - std::string_view subjectOfSetProp = isolateTermFromQuotes(s.substr(s.find('(') + 1)); + std::string_view subjectOfSetProp = isolateTermFromQuotes( + script.substr(script.find('(') + 1) + ); if (checkForScenegraphNodeAccessNav(subjectOfSetProp)) { - std::string_view navNode = isolateTermFromQuotes(s.substr(s.find(',') + 1)); + std::string_view navNode = isolateTermFromQuotes( + script.substr(script.find(',') + 1) + ); if (navNode != "nil") { auto it = std::find(_loadedNodes.begin(), _loadedNodes.end(), navNode); if (it == _loadedNodes.end()) { diff --git a/src/interaction/tasks/convertrecformattask.cpp b/src/interaction/tasks/convertrecformattask.cpp index 4ac7a2e7a7..60dc0130a0 100644 --- a/src/interaction/tasks/convertrecformattask.cpp +++ b/src/interaction/tasks/convertrecformattask.cpp @@ -37,9 +37,6 @@ namespace { constexpr std::string_view _loggerCat = "ConvertRecFormatTask"; - constexpr std::string_view KeyInFilePath = "InputFilePath"; - constexpr std::string_view KeyOutFilePath = "OutputFilePath"; - struct [[codegen::Dictionary(ConvertRecFormatTask)]] Parameters { std::filesystem::path inputFilePath; std::filesystem::path outputFilePath; diff --git a/src/scene/scene_lua.inl b/src/scene/scene_lua.inl index ea6e0286db..8616599315 100644 --- a/src/scene/scene_lua.inl +++ b/src/scene/scene_lua.inl @@ -1044,7 +1044,7 @@ void createCustomProperty( TriggerProperty* p = new TriggerProperty(info); if (onChange.has_value() && !onChange->empty()) { p->onChange( - [p, script = *onChange]() { + [script = *onChange]() { using namespace ghoul::lua; LuaState s; openspace::global::scriptEngine->initializeLuaState(s); diff --git a/support/cmake/set_openspace_compile_settings.cmake b/support/cmake/set_openspace_compile_settings.cmake index c82fa7fd97..a2c1dc4db8 100644 --- a/support/cmake/set_openspace_compile_settings.cmake +++ b/support/cmake/set_openspace_compile_settings.cmake @@ -146,7 +146,12 @@ function (set_openspace_compile_settings target) "-Wno-deprecated-enum-enum-conversion" "-Wno-missing-braces" "-Wno-sign-compare" + "-Wno-suggest-destructor-override" "-Wno-unknown-attributes" + + # This should be removed as soon as https://github.com/g-truc/glm/issues/1349 is + # addressed + "-Wno-defaulted-function-deleted" ) diff --git a/support/coding/codegen b/support/coding/codegen index 35ef00fc05..b2af1bef7e 160000 --- a/support/coding/codegen +++ b/support/coding/codegen @@ -1 +1 @@ -Subproject commit 35ef00fc050b3f0806b9347fa4141555d653c3c7 +Subproject commit b2af1bef7e9a3f59b98097e372cfcba2e6bf3303 diff --git a/tests/test_profile.cpp b/tests/test_profile.cpp index 45e765298a..86e1adfe11 100644 --- a/tests/test_profile.cpp +++ b/tests/test_profile.cpp @@ -41,13 +41,6 @@ // compiler to agree // NOLINTBEGIN(modernize-use-emplace) -namespace { - std::ostream& operator<<(std::ostream& os, const openspace::Profile& profile) { - os << profile.serialize(); - return os; - } -} // namespace openspace - using namespace openspace; // diff --git a/tests/test_sgctedit.cpp b/tests/test_sgctedit.cpp index c91bbb9029..9c01aacfcd 100644 --- a/tests/test_sgctedit.cpp +++ b/tests/test_sgctedit.cpp @@ -37,13 +37,6 @@ using namespace openspace; namespace { - std::string stringify(const std::filesystem::path& filename) { - const std::ifstream myfile = std::ifstream(filename); - std::stringstream buffer; - buffer << myfile.rdbuf(); - return buffer.str(); - } - void validate(std::string_view cfgString) { const std::filesystem::path schemaDir = absPath("${TESTDIR}/../config/schema"); const std::filesystem::path schema = schemaDir / "sgcteditor.schema.json";