diff --git a/Jenkinsfile b/Jenkinsfile index f9105c46d7..70a9e84b13 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,12 +4,12 @@ def modules = [ "fieldlines", "galaxy", "globebrowsing", + "imgui", "iswa", "kameleon", "kameleonvolume", "multiresvolume", - "newhorizons", - "onscreengui", + "spacecraftinstruments", "space", "toyvolume", "volume" @@ -36,7 +36,7 @@ stage('Build') { cd build cmake .. ''' + flags + ''' .. - make -j4 + make -j4 OpenSpace ''' } } diff --git a/ext/ghoul b/ext/ghoul index bae3585e8d..d4d529d2f1 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit bae3585e8de2bab25c571d3114547de267602826 +Subproject commit d4d529d2f142af03c1f40ab7fdc179cfd5320c6d diff --git a/ext/sgct b/ext/sgct index 278d45d9df..462cca02c6 160000 --- a/ext/sgct +++ b/ext/sgct @@ -1 +1 @@ -Subproject commit 278d45d9df82094abfd177026d0dfce7be67eaca +Subproject commit 462cca02c68e6fe74ccc3aa18580aae673ecc5aa diff --git a/include/openspace/rendering/framebufferrenderer.h b/include/openspace/rendering/framebufferrenderer.h index 6f61cd2238..470abafe84 100644 --- a/include/openspace/rendering/framebufferrenderer.h +++ b/include/openspace/rendering/framebufferrenderer.h @@ -118,7 +118,6 @@ private: GLuint _screenQuad; GLuint _vertexPositionBuffer; GLuint _mainColorTexture; - GLuint _mainOtherDataTexture; GLuint _mainPositionTexture; GLuint _mainNormalTexture; GLuint _mainDepthTexture; diff --git a/modules/atmosphere/rendering/atmospheredeferredcaster.cpp b/modules/atmosphere/rendering/atmospheredeferredcaster.cpp index c2842a3a33..a44fcd657e 100644 --- a/modules/atmosphere/rendering/atmospheredeferredcaster.cpp +++ b/modules/atmosphere/rendering/atmospheredeferredcaster.cpp @@ -249,7 +249,7 @@ void AtmosphereDeferredcaster::preRaycast(const RenderData& renderData, // The following scale comes from PSC transformations. float fScaleFactor = renderData.camera.scaling().x * - pow(10.0, renderData.camera.scaling().y); + pow(10.f, renderData.camera.scaling().y); glm::dmat4 dfScaleCamTransf = glm::scale(glm::dvec3(fScaleFactor)); program.setUniform( "dInverseScaleTransformMatrix", diff --git a/modules/base/dashboard/dashboarditemangle.cpp b/modules/base/dashboard/dashboarditemangle.cpp index 9957204512..c850d050b7 100644 --- a/modules/base/dashboard/dashboarditemangle.cpp +++ b/modules/base/dashboard/dashboarditemangle.cpp @@ -323,11 +323,11 @@ DashboardItemAngle::DashboardItemAngle(ghoul::Dictionary dictionary) ); }); if (dictionary.hasKey(DestinationTypeInfo.identifier)) { - std::string value = dictionary.value(DestinationTypeInfo.identifier); - if (value == "Node") { + std::string type = dictionary.value(DestinationTypeInfo.identifier); + if (type == "Node") { _destination.type = Type::Node; } - else if (value == "Focus") { + else if (type == "Focus") { _destination.type = Type::Focus; } else { @@ -391,7 +391,7 @@ std::pair DashboardItemAngle::positionAndLabel( default: return { glm::dvec3(0.0), "Unknown" }; } -}; +} void DashboardItemAngle::render(glm::vec2& penPosition) { std::pair sourceInfo = positionAndLabel(_source); diff --git a/modules/base/dashboard/dashboarditemdistance.cpp b/modules/base/dashboard/dashboarditemdistance.cpp index 9f0954a657..2ca2cf17ce 100644 --- a/modules/base/dashboard/dashboarditemdistance.cpp +++ b/modules/base/dashboard/dashboarditemdistance.cpp @@ -409,7 +409,7 @@ std::pair DashboardItemDistance::positionAndLabel( default: return { glm::dvec3(0.0), "Unknown" }; } -}; +} void DashboardItemDistance::render(glm::vec2& penPosition) { std::pair sourceInfo = positionAndLabel( diff --git a/modules/base/rendering/renderableplaneimagelocal.h b/modules/base/rendering/renderableplaneimagelocal.h index 17a3e5ff42..b39e2d2b1c 100644 --- a/modules/base/rendering/renderableplaneimagelocal.h +++ b/modules/base/rendering/renderableplaneimagelocal.h @@ -51,7 +51,7 @@ public: static documentation::Documentation Documentation(); protected: - virtual void bindTexture(); + virtual void bindTexture() override; private: void loadTexture(); diff --git a/modules/base/rendering/renderableplaneimageonline.h b/modules/base/rendering/renderableplaneimageonline.h index 988d94cf69..7a09cc47f0 100644 --- a/modules/base/rendering/renderableplaneimageonline.h +++ b/modules/base/rendering/renderableplaneimageonline.h @@ -50,7 +50,7 @@ public: static documentation::Documentation Documentation(); protected: - virtual void bindTexture(); + virtual void bindTexture() override; private: std::future downloadImageToMemory(std::string url); @@ -61,10 +61,6 @@ private: std::unique_ptr _texture; bool _textureIsDirty; - bool _downloadImage; - - - }; } // namespace openspace diff --git a/modules/base/rendering/renderablesphere.cpp b/modules/base/rendering/renderablesphere.cpp index da2abe5e17..1b56dea202 100644 --- a/modules/base/rendering/renderablesphere.cpp +++ b/modules/base/rendering/renderablesphere.cpp @@ -302,16 +302,16 @@ void RenderableSphere::render(const RenderData& data, RendererTasks&) { float adjustedTransparency = _transparency; if (_fadeInThreshold > 0.0) { - float distCamera = glm::length(data.camera.positionVec3()); + double distCamera = glm::length(data.camera.positionVec3()); float funcValue = static_cast( (1.0 / double(_fadeInThreshold/1E24))*(distCamera / 1E24) ); - adjustedTransparency *= funcValue > 1.0 ? 1.0 : funcValue; + adjustedTransparency *= funcValue > 1.f ? 1.f : funcValue; } if (_fadeOutThreshold > -1.0) { - float distCamera = glm::distance( + double distCamera = glm::distance( data.camera.positionVec3(), data.position.dvec3() ); diff --git a/modules/base/rotation/fixedrotation.cpp b/modules/base/rotation/fixedrotation.cpp index c71629cb41..8167eb86ed 100644 --- a/modules/base/rotation/fixedrotation.cpp +++ b/modules/base/rotation/fixedrotation.cpp @@ -533,7 +533,7 @@ bool FixedRotation::initialize() { return res; } -glm::dmat3 FixedRotation::matrix(const Time& time) const { +glm::dmat3 FixedRotation::matrix(const Time&) const { if (!_enabled) { return glm::dmat3(); } diff --git a/modules/base/translation/statictranslation.h b/modules/base/translation/statictranslation.h index 27008cc18a..d975af3604 100644 --- a/modules/base/translation/statictranslation.h +++ b/modules/base/translation/statictranslation.h @@ -38,7 +38,7 @@ public: StaticTranslation(); StaticTranslation(const ghoul::Dictionary& dictionary); - glm::dvec3 position(const Time& time) const; + glm::dvec3 position(const Time& time) const override; static documentation::Documentation Documentation(); private: diff --git a/modules/digitaluniverse/rendering/renderabledumeshes.cpp b/modules/digitaluniverse/rendering/renderabledumeshes.cpp index 9737aa2a2b..af0fe19bfb 100644 --- a/modules/digitaluniverse/rendering/renderabledumeshes.cpp +++ b/modules/digitaluniverse/rendering/renderabledumeshes.cpp @@ -521,8 +521,6 @@ void RenderableDUMeshes::renderLabels(const RenderData& data, const glm::vec3& orthoRight, const glm::vec3& orthoUp) { - RenderEngine& renderEngine = OsEng.renderEngine(); - float scale = 0.0; switch (_unit) { case Meter: diff --git a/modules/digitaluniverse/rendering/renderableplanescloud.cpp b/modules/digitaluniverse/rendering/renderableplanescloud.cpp index c952dd4929..e5f3c8d358 100644 --- a/modules/digitaluniverse/rendering/renderableplanescloud.cpp +++ b/modules/digitaluniverse/rendering/renderableplanescloud.cpp @@ -674,8 +674,6 @@ void RenderablePlanesCloud::renderLabels(const RenderData& data, const glm::dvec3& orthoRight, const glm::dvec3& orthoUp, float fadeInVariable) { - RenderEngine& renderEngine = OsEng.renderEngine(); - float scale = 0.0; switch (_unit) { case Meter: diff --git a/modules/digitaluniverse/rendering/renderablepoints.cpp b/modules/digitaluniverse/rendering/renderablepoints.cpp index 246d1039eb..809e11e950 100644 --- a/modules/digitaluniverse/rendering/renderablepoints.cpp +++ b/modules/digitaluniverse/rendering/renderablepoints.cpp @@ -388,8 +388,8 @@ void RenderablePoints::update(const UpdateData&) { if (_hasColorMapFile) { - const size_t nAstronomicalObjects = _fullData.size() / - _nValuesPerAstronomicalObject; + // const size_t nAstronomicalObjects = _fullData.size() / + // _nValuesPerAstronomicalObject; // const size_t nValues = _slicedData.size() / nAstronomicalObjects; // GLsizei stride = static_cast(sizeof(double) * nValues); diff --git a/modules/fieldlines/rendering/renderablefieldlines.cpp b/modules/fieldlines/rendering/renderablefieldlines.cpp index 1ede4fce39..6f4db47149 100644 --- a/modules/fieldlines/rendering/renderablefieldlines.cpp +++ b/modules/fieldlines/rendering/renderablefieldlines.cpp @@ -38,38 +38,39 @@ #include namespace { + std::string _loggerCat = "RenderableFieldlines"; - const float defaultFieldlineStepSize = 0.5f;; + constexpr const float defaultFieldlineStepSize = 0.5f; const glm::vec4 defaultFieldlineColor = glm::vec4(1.f, 0.f, 0.f, 1.f); - const char* keyVectorField = "VectorField"; - const char* keyVectorFieldType = "Type"; - const char* keyVectorFieldFile = "File"; - const char* keyVectorFieldVolumeModel = "Model"; - const char* keyVectorFieldVolumeVariable = "Variables"; + constexpr const char* keyVectorField = "VectorField"; + constexpr const char* keyVectorFieldType = "Type"; + constexpr const char* keyVectorFieldFile = "File"; + constexpr const char* keyVectorFieldVolumeModel = "Model"; + constexpr const char* keyVectorFieldVolumeVariable = "Variables"; - const char* keyFieldlines = "Fieldlines"; - const char* keyFieldlinesStepSize = "Stepsize"; - const char* keyFieldlinesClassification = "Classification"; - const char* keyFieldlinesColor = "Color"; + constexpr const char* keyFieldlines = "Fieldlines"; + constexpr const char* keyFieldlinesStepSize = "Stepsize"; + constexpr const char* keyFieldlinesClassification = "Classification"; + constexpr const char* keyFieldlinesColor = "Color"; - const char* keySeedPoints = "SeedPoints"; - const char* keySeedPointsType = "Type"; - const char* keySeedPointsFile = "File"; - const char* keySeedPointsTable = "SeedPoints"; + constexpr const char* keySeedPoints = "SeedPoints"; + constexpr const char* keySeedPointsType = "Type"; + constexpr const char* keySeedPointsFile = "File"; + constexpr const char* keySeedPointsTable = "SeedPoints"; - const char* seedPointsSourceFile = "File"; - const char* seedPointsSourceTable = "Table"; + constexpr const char* seedPointsSourceFile = "File"; + constexpr const char* seedPointsSourceTable = "Table"; - const char* vectorFieldTypeVolumeKameleon = "VolumeKameleon"; + constexpr const char* vectorFieldTypeVolumeKameleon = "VolumeKameleon"; - const char* vectorFieldKameleonModelBATSRUS = "BATSRUS"; + constexpr const char* vectorFieldKameleonModelBATSRUS = "BATSRUS"; - const char* vectorFieldKameleonVariableLorentz = "Lorentz"; + constexpr const char* vectorFieldKameleonVariableLorentz = "Lorentz"; - const int SeedPointSourceFile = 0; - const int SeedPointSourceTable = 1; + constexpr const int SeedPointSourceFile = 0; + constexpr const int SeedPointSourceTable = 1; static const openspace::properties::Property::PropertyInfo StepSizeInfo = { "StepSize", @@ -309,7 +310,7 @@ void RenderableFieldlines::update(const UpdateData&) { int prevEnd = 0; std::vector vertexData; // Arrange data for glMultiDrawArrays - for (int j = 0; j < fieldlines.size(); ++j) { + for (size_t j = 0; j < fieldlines.size(); ++j) { _lineStart.push_back(prevEnd); _lineCount.push_back(static_cast(fieldlines[j].size())); prevEnd = prevEnd + static_cast(fieldlines[j].size()); diff --git a/modules/globebrowsing/geometry/angle.inl b/modules/globebrowsing/geometry/angle.inl index 497c8cef06..999c72f2a1 100644 --- a/modules/globebrowsing/geometry/angle.inl +++ b/modules/globebrowsing/geometry/angle.inl @@ -88,7 +88,7 @@ T Angle::asRadians() const { template T Angle::asDegrees() const { - return _radians * 180.0 / PI; + return _radians * T(180.0) / PI; } template diff --git a/modules/globebrowsing/tile/tileprovider/defaulttileprovider.cpp b/modules/globebrowsing/tile/tileprovider/defaulttileprovider.cpp index b077db593b..eaa31ba04c 100644 --- a/modules/globebrowsing/tile/tileprovider/defaulttileprovider.cpp +++ b/modules/globebrowsing/tile/tileprovider/defaulttileprovider.cpp @@ -47,7 +47,6 @@ namespace { const char* KeyPerformPreProcessing = "PerformPreProcessing"; const char* KeyTilePixelSize = "TilePixelSize"; const char* KeyFilePath = "FilePath"; - const char* KeyBasePath = "BasePath"; const char* KeyPreCacheLevel = "PreCacheLevel"; const char* KeyPadTiles = "PadTiles"; diff --git a/modules/imgui/src/guiiswacomponent.cpp b/modules/imgui/src/guiiswacomponent.cpp index 408a38630e..661382cbb1 100644 --- a/modules/imgui/src/guiiswacomponent.cpp +++ b/modules/imgui/src/guiiswacomponent.cpp @@ -141,11 +141,11 @@ void GuiIswaComponent::render() { int cdfOptionValue = _cdfOptionsMap[groupName]; const auto& cdfs = group.second; - for (int i = 0; i < cdfs.size(); ++i) { + for (size_t i = 0; i < cdfs.size(); ++i) { ImGui::RadioButton( cdfs[i].name.c_str(), &_cdfOptionsMap[groupName], - i + static_cast(i) ); } @@ -192,7 +192,7 @@ void GuiIswaComponent::render() { ImGui::SameLine(); if (ImGui::CollapsingHeader(("Description" + std::to_string(id)).c_str())) { - ImGui::TextWrapped(info->description.c_str()); + ImGui::TextWrapped("%s", info->description.c_str()); ImGui::Spacing(); } diff --git a/modules/imgui/src/renderproperties.cpp b/modules/imgui/src/renderproperties.cpp index 4606673f60..530b3fd0b2 100644 --- a/modules/imgui/src/renderproperties.cpp +++ b/modules/imgui/src/renderproperties.cpp @@ -37,10 +37,8 @@ #include #include -#include #include -#include #include namespace openspace { @@ -505,8 +503,8 @@ void renderVec2Property(Property* prop, const std::string& ownerName, ImGui::PushID((ownerName + "." + name).c_str()); Vec2Property::ValueType value = *p; - float min = static_cast(glm::compMin(p->minValue())); - float max = static_cast(glm::compMax(p->maxValue())); + float min = glm::compMin(p->minValue()); + float max = glm::compMax(p->maxValue()); bool changed = ImGui::SliderFloat2( name.c_str(), @@ -541,8 +539,8 @@ void renderVec3Property(Property* prop, const std::string& ownerName, ImGui::PushID((ownerName + "." + name).c_str()); Vec3Property::ValueType value = *p; - float min = static_cast(glm::compMin(p->minValue())); - float max = static_cast(glm::compMax(p->maxValue())); + float min = glm::compMin(p->minValue()); + float max = glm::compMax(p->maxValue()); bool changed = false; if (prop->viewOption(Property::ViewOptions::Color)) { @@ -586,8 +584,8 @@ void renderVec4Property(Property* prop, const std::string& ownerName, ImGui::PushID((ownerName + "." + name).c_str()); Vec4Property::ValueType value = *p; - float min = static_cast(glm::compMin(p->minValue())); - float max = static_cast(glm::compMax(p->maxValue())); + float min = glm::compMin(p->minValue()); + float max = glm::compMax(p->maxValue()); bool changed = false; if (prop->viewOption(Property::ViewOptions::Color)) { @@ -610,7 +608,7 @@ void renderVec4Property(Property* prop, const std::string& ownerName, renderTooltip(prop, tooltipDelay); } - if (value != p->value()) { + if (changed) { executeScript( p->fullyQualifiedIdentifier(), std::to_string(value), diff --git a/modules/iswa/ext/json.h b/modules/iswa/ext/json.h index 38e1e7a6cc..eddbb50955 100644 --- a/modules/iswa/ext/json.h +++ b/modules/iswa/ext/json.h @@ -30,8 +30,19 @@ #pragma warning (disable : 4706) // assignment within conditional expression #endif // WIN32 +#if defined(__GNUC__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant" +#pragma GCC diagnostic ignored "-Wuseless-cast" +#endif // __GNUC__ + + #include +#if defined(__GNUC__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif // __GNUC__ + #ifdef WIN32 #pragma warning (pop) #endif // WIN32 diff --git a/modules/iswa/rendering/datacygnet.cpp b/modules/iswa/rendering/datacygnet.cpp index 6ff40e42a2..696a38649a 100644 --- a/modules/iswa/rendering/datacygnet.cpp +++ b/modules/iswa/rendering/datacygnet.cpp @@ -83,14 +83,15 @@ namespace openspace { DataCygnet::DataCygnet(const ghoul::Dictionary& dictionary) : IswaCygnet(dictionary) - , _dataProcessor(nullptr) , _dataOptions(DataOptionsInfo) + , _transferFunctionsFile(TransferFunctionsFile, "${SCENE}/iswa/tfs/default.tf") + , _backgroundValues(BackgroundInfo, glm::vec2(0.f), glm::vec2(0.f), glm::vec2(1.f)) + , _normValues(NormalizeValuesInfo, glm::vec2(1.f), glm::vec2(0.f), glm::vec2(5.f)) , _useLog(UseLogInfo, false) , _useHistogram(UseHistogramInfo, false) , _autoFilter(AutoFilterInfo, true) - , _normValues(NormalizeValuesInfo, glm::vec2(1.f), glm::vec2(0.f), glm::vec2(5.f)) - , _backgroundValues(BackgroundInfo, glm::vec2(0.f), glm::vec2(0.f), glm::vec2(1.f)) - , _transferFunctionsFile(TransferFunctionsFile, "${SCENE}/iswa/tfs/default.tf") + + , _dataProcessor(nullptr) //FOR TESTING , _numOfBenchmarks(0) , _avgBenchmarkTime(0.0f) @@ -187,8 +188,11 @@ bool DataCygnet::readyToRender() const{ */ void DataCygnet::setTextureUniforms(){ std::vector selectedOptions = _dataOptions.value(); - int activeTextures = std::min((int)selectedOptions.size(), MAX_TEXTURES); - int activeTransferfunctions = std::min((int)_transferFunctions.size(), MAX_TEXTURES); + int activeTextures = std::min(static_cast(selectedOptions.size()), MAX_TEXTURES); + int activeTransferfunctions = std::min( + static_cast(_transferFunctions.size()), + MAX_TEXTURES + ); // Set Textures ghoul::opengl::TextureUnit txUnits[MAX_TEXTURES]; @@ -207,8 +211,11 @@ void DataCygnet::setTextureUniforms(){ } } - if(activeTextures > 0 && selectedOptions.back()>=(int)_transferFunctions.size()) + if (activeTextures > 0 && + selectedOptions.back() >= static_cast(_transferFunctions.size())) + { activeTransferfunctions = 1; + } ghoul::opengl::TextureUnit tfUnits[MAX_TEXTURES]; j = 0; diff --git a/modules/iswa/rendering/datacygnet.h b/modules/iswa/rendering/datacygnet.h index 340c7344e5..8e057a2d88 100644 --- a/modules/iswa/rendering/datacygnet.h +++ b/modules/iswa/rendering/datacygnet.h @@ -78,18 +78,7 @@ protected: */ virtual bool updateTextureResource() override; - // Subclass interface. - // =================== - virtual bool createGeometry() = 0; - virtual bool destroyGeometry() = 0; - virtual void renderGeometry() const = 0; - /** - * This function should return the processed data that - * will populate the texture - */ virtual std::vector textureData() = 0; - // This function can call parent setTextureUniforms() - virtual void setUniforms() = 0; properties::SelectionProperty _dataOptions; properties::StringProperty _transferFunctionsFile; diff --git a/modules/iswa/rendering/dataplane.cpp b/modules/iswa/rendering/dataplane.cpp index 7efbb6e456..85e10128d4 100644 --- a/modules/iswa/rendering/dataplane.cpp +++ b/modules/iswa/rendering/dataplane.cpp @@ -27,10 +27,6 @@ #include -namespace { - constexpr const char* _loggerCat = "DataPlane"; -} // namespace - namespace openspace { DataPlane::DataPlane(const ghoul::Dictionary& dictionary) diff --git a/modules/iswa/rendering/iswabasegroup.cpp b/modules/iswa/rendering/iswabasegroup.cpp index 24132a1858..cfa763871c 100644 --- a/modules/iswa/rendering/iswabasegroup.cpp +++ b/modules/iswa/rendering/iswabasegroup.cpp @@ -66,9 +66,9 @@ IswaBaseGroup::IswaBaseGroup(std::string name, std::string type) , _enabled(EnabledInfo, true) , _alpha(AlphaInfo, 0.9f, 0.f, 1.f) , _delete(DeleteInfo) + , _dataProcessor(nullptr) , _registered(false) , _type(type) - , _dataProcessor(nullptr) { addProperty(_enabled); addProperty(_alpha); @@ -102,8 +102,7 @@ std::shared_ptr IswaBaseGroup::dataProcessor(){ std::shared_ptr > IswaBaseGroup::groupEvent() { return _groupEvent; -}; - +} void IswaBaseGroup::registerProperties(){ _enabled.onChange([this]{ diff --git a/modules/iswa/rendering/iswacygnet.cpp b/modules/iswa/rendering/iswacygnet.cpp index fb123d30d3..8aed4c1d4c 100644 --- a/modules/iswa/rendering/iswacygnet.cpp +++ b/modules/iswa/rendering/iswacygnet.cpp @@ -82,8 +82,8 @@ IswaCygnet::IswaCygnet(const ghoul::Dictionary& dictionary) dictionary.getValue("CoordinateType", _data->coordinateType); dictionary.getValue("XOffset", xOffset); - _data->id = (int) renderableId; - _data->updateTime = (int) updateTime; + _data->id = static_cast(renderableId); + _data->updateTime = static_cast(updateTime); _data->spatialScale = spatialScale; _data->gridMin = min; _data->gridMax = max; @@ -98,7 +98,6 @@ IswaCygnet::IswaCygnet(const ghoul::Dictionary& dictionary) (max.z - min.z) ); - offset = glm::vec3( (min.x + (std::abs(min.x)+std::abs(max.x))/2.0f)+xOffset, (min.y + (std::abs(min.y)+std::abs(max.y))/2.0f), @@ -112,7 +111,6 @@ IswaCygnet::IswaCygnet(const ghoul::Dictionary& dictionary) addProperty(_delete); dictionary.getValue("Group", _data->groupName); - } IswaCygnet::~IswaCygnet(){} @@ -294,7 +292,7 @@ void IswaCygnet::initializeGroup() { _alpha.setValue(dict.value("alpha")); }); - groupEvent->subscribe(name(), "clearGroup", [&](ghoul::Dictionary dict){ + groupEvent->subscribe(name(), "clearGroup", [&](ghoul::Dictionary){ LDEBUG(name() + " Event clearGroup"); OsEng.scriptEngine().queueScript( "openspace.removeSceneGraphNode('" + name() + "')", diff --git a/modules/iswa/rendering/kameleonplane.cpp b/modules/iswa/rendering/kameleonplane.cpp index e7d43d7faf..71cfce85d0 100644 --- a/modules/iswa/rendering/kameleonplane.cpp +++ b/modules/iswa/rendering/kameleonplane.cpp @@ -26,7 +26,17 @@ #include #include #include + +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant" +#endif // __GNUC__ + #include +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif // __GNUC__ + #include #include @@ -147,7 +157,7 @@ void KameleonPlane::initialize() { // Set Property callback specific to KameleonPlane _resolution.onChange([this](){ - for(int i=0; i<_textures.size(); i++){ + for (size_t i = 0; i < _textures.size(); i++) { _textures[i] = std::move(nullptr); } @@ -210,7 +220,7 @@ bool KameleonPlane::createGeometry() { GL_FLOAT, GL_FALSE, sizeof(GLfloat) * 6, - reinterpret_cast(0) + nullptr ); glEnableVertexAttribArray(1); glVertexAttribPointer( @@ -247,7 +257,7 @@ std::vector KameleonPlane::textureData() { _dimensions, _slice ); -}; +} bool KameleonPlane::updateTextureResource() { _data->offset[_cut] = _data->gridMin[_cut]+_slice.value()*_scale; @@ -377,7 +387,7 @@ void KameleonPlane::setDimensions() { // the cdf files has an offset of 0.5 in normali resolution. // with lower resolution the offset increases. _data->offset = _origOffset - 0.5f* (100.f / _resolution.value()); - _dimensions = glm::size3_t(_data->scale * ((float)_resolution.value() / 100.f)); + _dimensions = glm::size3_t(_data->scale * (_resolution.value() / 100.f)); _dimensions[_cut] = 1; if (_cut == 0) { diff --git a/modules/iswa/rendering/kameleonplane.h b/modules/iswa/rendering/kameleonplane.h index 67b81dd6e0..b5fc3a8033 100644 --- a/modules/iswa/rendering/kameleonplane.h +++ b/modules/iswa/rendering/kameleonplane.h @@ -78,9 +78,9 @@ private: void changeKwPath(std::string path); static int id(); + properties::SelectionProperty _fieldlines; properties::FloatProperty _resolution; properties::FloatProperty _slice; - properties::SelectionProperty _fieldlines; std::string _kwPath; @@ -98,7 +98,7 @@ private: * This is the name, path to seedpoints file and a boolean to determine if it is * active or inactive. */ - std::map > _fieldlineState; + std::map> _fieldlineState; std::string _fieldlineIndexFile; int _cut; diff --git a/modules/iswa/rendering/screenspacecygnet.cpp b/modules/iswa/rendering/screenspacecygnet.cpp index f29f50fb0b..0a6eb6bc35 100644 --- a/modules/iswa/rendering/screenspacecygnet.cpp +++ b/modules/iswa/rendering/screenspacecygnet.cpp @@ -29,23 +29,13 @@ #include #include -namespace { - constexpr const char* _loggerCat = "ScreenSpaceCygnet"; -} // namespace - namespace openspace { ScreenSpaceCygnet::ScreenSpaceCygnet(const ghoul::Dictionary& dictionary) : ScreenSpaceImageOnline(dictionary) { - // hacky, have to first get as float and then cast to int. - float cygnetid; - dictionary.getValue("CygnetId", cygnetid); - _cygnetId = (int)cygnetid; - - float interval; - dictionary.getValue("UpdateInterval", interval); - _updateTime = (int) interval; + _cygnetId = static_cast(dictionary.value("CygnetId")); + _updateTime = static_cast(dictionary.value("UpdateInterval")); _downloadImage = true; _texturePath = IswaManager::ref().iswaUrl(_cygnetId); diff --git a/modules/iswa/rendering/texturecygnet.cpp b/modules/iswa/rendering/texturecygnet.cpp index 3077da4912..620a46d164 100644 --- a/modules/iswa/rendering/texturecygnet.cpp +++ b/modules/iswa/rendering/texturecygnet.cpp @@ -42,7 +42,7 @@ TextureCygnet::~TextureCygnet() {} bool TextureCygnet::updateTexture() { auto texture = ghoul::io::TextureReader::ref().loadTexture( - (void*) _imageFile.buffer, + reinterpret_cast(_imageFile.buffer), _imageFile.size, _imageFile.format ); diff --git a/modules/iswa/rendering/texturecygnet.h b/modules/iswa/rendering/texturecygnet.h index 9e5ca8069a..cc7aa12026 100644 --- a/modules/iswa/rendering/texturecygnet.h +++ b/modules/iswa/rendering/texturecygnet.h @@ -48,12 +48,6 @@ protected: bool readyToRender() const override; bool updateTextureResource() override; - // Interface for concrete subclasses - virtual void setUniforms() = 0; - virtual bool createGeometry() = 0; - virtual bool destroyGeometry() = 0; - virtual void renderGeometry() const = 0; - private: DownloadManager::MemoryFile _imageFile; }; diff --git a/modules/iswa/util/dataprocessor.cpp b/modules/iswa/util/dataprocessor.cpp index edf7655bdf..b01334e895 100644 --- a/modules/iswa/util/dataprocessor.cpp +++ b/modules/iswa/util/dataprocessor.cpp @@ -43,7 +43,7 @@ DataProcessor::DataProcessor() _coordinateVariables = {"x", "y", "z", "phi", "theta"}; } -DataProcessor::~DataProcessor() {}; +DataProcessor::~DataProcessor() {} void DataProcessor::useLog(bool useLog) { _useLog = useLog; diff --git a/modules/iswa/util/dataprocessorkameleon.cpp b/modules/iswa/util/dataprocessorkameleon.cpp index fc7d16c3e0..6117417201 100644 --- a/modules/iswa/util/dataprocessorkameleon.cpp +++ b/modules/iswa/util/dataprocessorkameleon.cpp @@ -35,9 +35,8 @@ namespace openspace { DataProcessorKameleon::DataProcessorKameleon() : DataProcessor() - , _kwPath("") , _kw(nullptr) - , _initialized(false) + , _kwPath("") , _slice(0.5) {} diff --git a/modules/iswa/util/dataprocessorkameleon.h b/modules/iswa/util/dataprocessorkameleon.h index 024b572622..00cc0b992a 100644 --- a/modules/iswa/util/dataprocessorkameleon.h +++ b/modules/iswa/util/dataprocessorkameleon.h @@ -52,7 +52,6 @@ private: std::shared_ptr _kw; std::string _kwPath; std::vector _loadedVariables; - bool _initialized; float _slice; // std::vector _data; }; diff --git a/modules/iswa/util/dataprocessortext.cpp b/modules/iswa/util/dataprocessortext.cpp index 78cb099640..43aec88358 100644 --- a/modules/iswa/util/dataprocessortext.cpp +++ b/modules/iswa/util/dataprocessortext.cpp @@ -23,18 +23,6 @@ ****************************************************************************************/ #include -//#include -//#include -// -//#include -//#include -//#include -//#include -//#include - -namespace { - constexpr const char* _loggerCat = "DataProcessorText"; -} // namespace namespace openspace{ diff --git a/modules/iswa/util/iswamanager.cpp b/modules/iswa/util/iswamanager.cpp index df829853f4..135a1b57d2 100644 --- a/modules/iswa/util/iswamanager.cpp +++ b/modules/iswa/util/iswamanager.cpp @@ -194,7 +194,7 @@ void IswaManager::addKameleonCdf(std::string groupName, int pos) { std::future IswaManager::fetchImageCygnet(int id, double timestamp) { - return std::move(OsEng.downloadManager().fetchFile( + return OsEng.downloadManager().fetchFile( iswaUrl(id, timestamp, "image"), [id](const DownloadManager::MemoryFile&) { LDEBUG( @@ -208,13 +208,13 @@ std::future IswaManager::fetchImageCygnet(int id, std::to_string(id) + ": " + err ); } - ) ); + ); } std::future IswaManager::fetchDataCygnet(int id, double timestamp) { - return std::move(OsEng.downloadManager().fetchFile( + return OsEng.downloadManager().fetchFile( iswaUrl(id, timestamp, "data"), [id](const DownloadManager::MemoryFile&) { LDEBUG( @@ -228,7 +228,7 @@ std::future IswaManager::fetchDataCygnet(int id, std::to_string(id) + ": " + err ); } - ) ); + ); } std::string IswaManager::iswaUrl(int id, double timestamp, std::string type) { @@ -703,7 +703,7 @@ void IswaManager::addCdfFiles(std::string cdfpath) { _cdfInformation[groupName] = std::vector(); json cdfs = cdfGroup["cdfs"]; - for (int j = 0; j < cdfs.size(); j++) { + for (size_t j = 0; j < cdfs.size(); j++) { json cdf = cdfs.at(j); std::string name = cdf["name"]; diff --git a/modules/iswa/util/iswamanager_lua.inl b/modules/iswa/util/iswamanager_lua.inl index 4c732d2a47..deb34946a2 100644 --- a/modules/iswa/util/iswamanager_lua.inl +++ b/modules/iswa/util/iswamanager_lua.inl @@ -68,16 +68,15 @@ int iswa_addScreenSpaceCygnet(lua_State* L) { return 0; } - float id; - d.getValue("CygnetId", id); + int id = static_cast(d.value("CygnetId")); auto cygnetInformation = IswaManager::ref().cygnetInformation(); - if (cygnetInformation.find((int)id) == cygnetInformation.end()) { + if (cygnetInformation.find(id) == cygnetInformation.end()) { LWARNING("Could not find Cygnet with id = " + std::to_string(id)); return 0; } - auto info = cygnetInformation[(int)id]; + auto info = cygnetInformation[id]; std::string name = info->name; int updateInterval = info->updateInterval; info->selected = true; @@ -88,7 +87,7 @@ int iswa_addScreenSpaceCygnet(lua_State* L) { } else { d.setValue("Name", name); d.setValue("Type", "ScreenSpaceCygnet"); - d.setValue("UpdateInterval", (float) updateInterval); + d.setValue("UpdateInterval", static_cast(updateInterval)); std::shared_ptr s( ScreenSpaceRenderable::createFromDictionary(d) diff --git a/modules/kameleon/src/kameleonhelper.cpp b/modules/kameleon/src/kameleonhelper.cpp index 935710c845..0a6d9a697b 100644 --- a/modules/kameleon/src/kameleonhelper.cpp +++ b/modules/kameleon/src/kameleonhelper.cpp @@ -93,21 +93,26 @@ double getTime(ccmc::Kameleon* kameleon) { if (N_CHARS < 19) { // Fall through to add the required characters switch (N_CHARS) { - case 10 : // YYYY-MM-DD => YYYY-MM-DDTHH + case 10: // YYYY-MM-DD => YYYY-MM-DDTHH seqStartStr += "T00"; - case 13 : // YYYY-MM-DDTHH => YYYY-MM-DDTHH: + [[fallthrough]]; + case 13: // YYYY-MM-DDTHH => YYYY-MM-DDTHH: seqStartStr += ":"; - case 14 : // YYYY-MM-DDTHH: => YYYY-MM-DDTHH:MM + [[fallthrough]]; + case 14: // YYYY-MM-DDTHH: => YYYY-MM-DDTHH:MM seqStartStr += "00"; - case 16 : // YYYY-MM-DDTHH:MM => YYYY-MM-DDTHH:MM: + [[fallthrough]]; + case 16: // YYYY-MM-DDTHH:MM => YYYY-MM-DDTHH:MM: seqStartStr += ":"; - case 17 : // YYYY-MM-DDTHH:MM: => YYYY-MM-DDTHH:MM:SS + [[fallthrough]]; + case 17: // YYYY-MM-DDTHH:MM: => YYYY-MM-DDTHH:MM:SS seqStartStr += "00"; - // case 19 : // YYYY-MM-DDTHH:MM:SS => YYYY-MM-DDTHH:MM:SS.000 + [[fallthrough]]; + // case 19 : // YYYY-MM-DDTHH:MM:SS => YYYY-MM-DDTHH:MM:SS.000 // seqStartStr += ".000"; // case 23 : // YYYY-MM-DDTHH:MM:SS. => YYYY-MM-DDTHH:MM:SS.000Z // seqStartStr += "Z"; - default : + default: break; } } diff --git a/modules/kameleon/src/kameleonwrapper.cpp b/modules/kameleon/src/kameleonwrapper.cpp index eef3b96673..21ffb7a5f8 100644 --- a/modules/kameleon/src/kameleonwrapper.cpp +++ b/modules/kameleon/src/kameleonwrapper.cpp @@ -432,16 +432,13 @@ float* KameleonWrapper::getUniformSliceValues(const std::string& var, if (_gridType == GridType::Spherical) { // int z = zSlice; // Put r in the [0..sqrt(3)] range - double rNorm = sqrt(3.0) * static_cast(xi) / - static_cast(xDim); + double rNorm = sqrt(3.0) * static_cast(xi) / xDim; // Put theta in the [0..PI] range - double thetaNorm = M_PI * static_cast(yi) / - static_cast(yDim); + double thetaNorm = M_PI * static_cast(yi) / yDim; // Put phi in the [0..2PI] range - double phiNorm = 2.0 * M_PI * static_cast(zi) / - static_cast(zDim); + double phiNorm = 2.0 * M_PI * static_cast(zi) / zDim; // Go to physical coordinates before sampling double rPh = _xMin + rNorm * (_xMax-_xMin); @@ -546,12 +543,10 @@ float* KameleonWrapper::getUniformSampledVectorValues(const std::string& xVar, //LDEBUG(zVar << "Max: " << varZMax); //ProgressBar pb(static_cast(outDimensions.x)); - for (int x = 0; x < outDimensions.x; ++x) { + for (size_t x = 0; x < outDimensions.x; ++x) { //pb.print(x); - - for (int y = 0; y < outDimensions.y; ++y) { - for (int z = 0; z < outDimensions.z; ++z) { - + for (size_t y = 0; y < outDimensions.y; ++y) { + for (size_t z = 0; z < outDimensions.z; ++z) { unsigned int index = static_cast( x * channels + y * channels * outDimensions.x + z * channels * outDimensions.x * outDimensions.y diff --git a/modules/kameleonvolume/kameleonvolumereader.cpp b/modules/kameleonvolume/kameleonvolumereader.cpp index 0fa8fadc15..467823911c 100644 --- a/modules/kameleonvolume/kameleonvolumereader.cpp +++ b/modules/kameleonvolume/kameleonvolumereader.cpp @@ -89,12 +89,12 @@ std::unique_ptr> KameleonVolumeReader::readFloatVolume( } std::unique_ptr> KameleonVolumeReader::readFloatVolume( - const glm::uvec3 & dimensions, - const std::string & variable, - const glm::vec3 & lowerBound, - const glm::vec3 & upperBound, - float& minValue, - float& maxValue) const + const glm::uvec3 & dimensions, + const std::string & variable, + const glm::vec3 & lowerBound, + const glm::vec3 & upperBound, + float& minValue, + float& maxValue) const { minValue = FLT_MAX; maxValue = FLT_MIN; @@ -104,9 +104,9 @@ std::unique_ptr> KameleonVolumeReader::readFloatVolume( const glm::vec3 diff = upperBound - lowerBound; auto interpolate = - [this](const std::string& variable, glm::vec3 volumeCoords) { + [this](const std::string& var, glm::vec3 volumeCoords) { return _interpolator->interpolate( - variable, + var, volumeCoords[0], volumeCoords[1], volumeCoords[2]); diff --git a/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp b/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp index 4087463861..a633d27241 100644 --- a/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp +++ b/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp @@ -152,9 +152,9 @@ RenderableKameleonVolume::RenderableKameleonVolume(const ghoul::Dictionary& dict , _stepSize(StepSizeInfo, 0.02f, 0.01f, 1.f) , _sourcePath(SourcePathInfo) , _transferFunctionPath(TransferFunctionInfo) + , _cache(CacheInfo) , _raycaster(nullptr) , _transferFunction(nullptr) - , _cache(CacheInfo) { glm::vec3 dimensions; diff --git a/modules/multiresvolume/rendering/atlasmanager.cpp b/modules/multiresvolume/rendering/atlasmanager.cpp index 5a056b6daf..a2675df9cb 100644 --- a/modules/multiresvolume/rendering/atlasmanager.cpp +++ b/modules/multiresvolume/rendering/atlasmanager.cpp @@ -49,7 +49,7 @@ bool AtlasManager::initialize() { _nBricksPerDim = header.xNumBricks_; _nOtLeaves = _nBricksPerDim * _nBricksPerDim * _nBricksPerDim; _nOtNodes = _tsp->numOTNodes(); - _nOtLevels = log(_nOtLeaves)/log(8) + 1; + _nOtLevels = static_cast(log(_nOtLeaves)/log(8) + 1); _paddedBrickDim = _tsp->paddedBrickDim(); _nBricksInMap = _nBricksPerDim * _nBricksPerDim * _nBricksPerDim; _atlasDim = _nBricksPerDim * _paddedBrickDim; @@ -124,7 +124,11 @@ void AtlasManager::updateAtlas(BUFFER_INDEX bufferIndex, std::vector& brick int lastBrick = firstBrick; auto itEnd = itStart; - for (itEnd++; itEnd != _requiredBricks.end() && *itEnd == lastBrick + 1; itEnd++) { + for (itEnd++; + itEnd != _requiredBricks.end() && + *itEnd == static_cast(lastBrick) + 1; + itEnd++) + { lastBrick = *itEnd; } @@ -145,7 +149,9 @@ void AtlasManager::updateAtlas(BUFFER_INDEX bufferIndex, std::vector& brick pboToAtlas(bufferIndex); glBindBuffer(GL_SHADER_STORAGE_BUFFER, _atlasMapBuffer); - GLint *to = (GLint*)glMapBuffer(GL_SHADER_STORAGE_BUFFER, GL_WRITE_ONLY); + GLint *to = reinterpret_cast( + glMapBuffer(GL_SHADER_STORAGE_BUFFER, GL_WRITE_ONLY) + ); memcpy(to, _atlasMap.data(), sizeof(GLint)*_atlasMap.size()); glUnmapBuffer(GL_SHADER_STORAGE_BUFFER); glBindBuffer(GL_SHADER_STORAGE_BUFFER, 0); @@ -169,7 +175,7 @@ void AtlasManager::addToAtlas(int firstBrickIndex, int lastBrickIndex, float* ma if (!_brickMap.count(brickIndex)) { unsigned int atlasCoords = _freeAtlasCoords.back(); _freeAtlasCoords.pop_back(); - int level = _nOtLevels - floor(log((7.0 * (float(brickIndex % _nOtNodes)) + 1.0))/log(8)) - 1; + int level = _nOtLevels - static_cast(floor(log((7.0 * (float(brickIndex % _nOtNodes)) + 1.0))/log(8)) - 1); ghoul_assert(atlasCoords <= 0x0FFFFFFF, "@MISSING"); unsigned int atlasData = (level << 28) + atlasCoords; _brickMap.insert(std::pair(brickIndex, atlasData)); @@ -220,17 +226,18 @@ void AtlasManager::pboToAtlas(BUFFER_INDEX bufferIndex) { glBindBuffer(GL_PIXEL_UNPACK_BUFFER, _pboHandle[bufferIndex]); glm::size3_t dim = _textureAtlas->dimensions(); glBindTexture(GL_TEXTURE_3D, *_textureAtlas); - glTexSubImage3D(GL_TEXTURE_3D, // target - 0, // level - 0, // xoffset - 0, // yoffset - 0, // zoffset - dim[0], // width - dim[1], // height - dim[2], // depth - GL_RED, // format - GL_FLOAT, // type - NULL // *pixels + glTexSubImage3D( + GL_TEXTURE_3D, // target + 0, // level + 0, // xoffset + 0, // yoffset + 0, // zoffset + static_cast(dim[0]), // width + static_cast(dim[1]), // height + static_cast(dim[2]), // depth + GL_RED, // format + GL_FLOAT, // type + NULL // *pixels ); glBindTexture(GL_TEXTURE_3D, 0); glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0); diff --git a/modules/multiresvolume/rendering/brickmanager.cpp b/modules/multiresvolume/rendering/brickmanager.cpp index 5dfe356431..4c064aa807 100644 --- a/modules/multiresvolume/rendering/brickmanager.cpp +++ b/modules/multiresvolume/rendering/brickmanager.cpp @@ -285,13 +285,13 @@ bool BrickManager::FillVolume(float *_in, float *_out, void BrickManager::IncCoord() { // Update atlas coordinate xCoord_++; - if (xCoord_ == _header.xNumBricks_) { + if (xCoord_ == static_cast(_header.xNumBricks_)) { xCoord_ = 0; yCoord_++; - if (yCoord_ == _header.yNumBricks_) { + if (yCoord_ == static_cast(_header.yNumBricks_)) { yCoord_ = 0; zCoord_++; - if (zCoord_ == _header.zNumBricks_) { + if (zCoord_ == static_cast(_header.zNumBricks_)) { zCoord_ = 0; } } @@ -365,7 +365,7 @@ bool BrickManager::DiskToPBO(BUFFER_INDEX _pboIndex) { static_cast(brickSize_); */ - long offset = TSP::dataPosition() + + long long offset = TSP::dataPosition() + static_cast(brickIndex)* static_cast(brickSize_); @@ -442,16 +442,17 @@ bool BrickManager::PBOToAtlas(BUFFER_INDEX _pboIndex) { glBindBuffer(GL_PIXEL_UNPACK_BUFFER, pboHandle_[_pboIndex]); glm::size3_t dim = textureAtlas_->dimensions(); glBindTexture(GL_TEXTURE_3D, *textureAtlas_); - glTexSubImage3D(GL_TEXTURE_3D, // target + glTexSubImage3D( + GL_TEXTURE_3D, // target 0, // level 0, // xoffset 0, // yoffset 0, // zoffset - dim[0], // width - dim[1], // height - dim[2], // depth - GL_RED, // format - GL_FLOAT, // type + static_cast(dim[0]), // width + static_cast(dim[1]), // height + static_cast(dim[2]), // depth + GL_RED, // format + GL_FLOAT, // type NULL); // *pixels glBindTexture(GL_TEXTURE_3D, 0); glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0); diff --git a/modules/multiresvolume/rendering/errorhistogrammanager.cpp b/modules/multiresvolume/rendering/errorhistogrammanager.cpp index 53cc35f4e2..c44fbd8380 100644 --- a/modules/multiresvolume/rendering/errorhistogrammanager.cpp +++ b/modules/multiresvolume/rendering/errorhistogrammanager.cpp @@ -55,8 +55,10 @@ bool ErrorHistogramManager::buildHistograms(int numBins) { _maxBin = 1.0; // Should be calculated from tsp file as (maxValue - minValue) unsigned int numOtLevels = _tsp->numOTLevels(); - unsigned int numOtLeaves = pow(8, numOtLevels - 1); - unsigned int numBstLeaves = pow(2, _tsp->numBSTLevels() - 1); + unsigned int numOtLeaves = static_cast(pow(8, numOtLevels - 1)); + unsigned int numBstLeaves = static_cast( + pow(2, _tsp->numBSTLevels() - 1) + ); _numInnerNodes = _tsp->numTotalNodes() - numOtLeaves * numBstLeaves; _histograms = std::vector(_numInnerNodes); diff --git a/modules/multiresvolume/rendering/histogrammanager.cpp b/modules/multiresvolume/rendering/histogrammanager.cpp index b81f8d1c7c..40a75fc836 100644 --- a/modules/multiresvolume/rendering/histogrammanager.cpp +++ b/modules/multiresvolume/rendering/histogrammanager.cpp @@ -71,9 +71,9 @@ bool HistogramManager::buildHistogram(TSP* tsp, unsigned int brickIndex) { if (isBstLeaf && isOctreeLeaf) { // TSP leaf, read from file and build histogram std::vector voxelValues = readValues(tsp, brickIndex); - unsigned int numVoxels = voxelValues.size(); + size_t numVoxels = voxelValues.size(); - for (unsigned int v = 0; v < numVoxels; ++v) { + for (size_t v = 0; v < numVoxels; ++v) { histogram.add(voxelValues[v], 1.0); } } else { @@ -92,8 +92,8 @@ bool HistogramManager::buildHistogram(TSP* tsp, unsigned int brickIndex) { children.push_back(firstChild + c); } } - int numChildren = children.size(); - for (int c = 0; c < numChildren; c++) { + size_t numChildren = children.size(); + for (size_t c = 0; c < numChildren; c++) { // Visit child unsigned int childIndex = children[c]; if (_histograms[childIndex].isValid() || buildHistogram(tsp, childIndex)) { @@ -167,7 +167,7 @@ bool HistogramManager::saveToFile(const std::string& filename) { return false; } - int numHistograms = _histograms.size(); + size_t numHistograms = _histograms.size(); file.write(reinterpret_cast(&numHistograms), sizeof(int)); file.write(reinterpret_cast(&_numBins), sizeof(int)); file.write(reinterpret_cast(&_minBin), sizeof(float)); @@ -176,9 +176,9 @@ bool HistogramManager::saveToFile(const std::string& filename) { int nFloats = numHistograms * _numBins; float* histogramData = new float[nFloats]; - for (int i = 0; i < numHistograms; ++i) { - int offset = i*_numBins; - memcpy(&histogramData[offset], _histograms[i].data(), sizeof(float) * _numBins); + for (size_t i = 0; i < numHistograms; ++i) { + int offset = i*_numBins; + memcpy(&histogramData[offset], _histograms[i].data(), sizeof(float) * _numBins); } file.write(reinterpret_cast(histogramData), sizeof(float) * nFloats); diff --git a/modules/multiresvolume/rendering/renderablemultiresvolume.h b/modules/multiresvolume/rendering/renderablemultiresvolume.h index b98986d594..cf4018321e 100644 --- a/modules/multiresvolume/rendering/renderablemultiresvolume.h +++ b/modules/multiresvolume/rendering/renderablemultiresvolume.h @@ -74,7 +74,7 @@ public: bool isReady() const override; virtual void update(const UpdateData& data) override; - virtual void render(const RenderData& data, RendererTasks& tasks); + virtual void render(const RenderData& data, RendererTasks& tasks) override; //virtual void preResolve(ghoul::opengl::ProgramObject* program) override; //virtual std::string getHeaderPath() override; diff --git a/modules/space/rendering/renderableplanet.cpp b/modules/space/rendering/renderableplanet.cpp index 8f4855569a..c1c6ddd5f6 100644 --- a/modules/space/rendering/renderableplanet.cpp +++ b/modules/space/rendering/renderableplanet.cpp @@ -412,7 +412,7 @@ glm::dmat4 RenderablePlanet::computeModelTransformMatrix( glm::dmat4 modelTransform = glm::translate(glm::dmat4(1.0), transformData.translation) * // Translation glm::dmat4(transformData.rotation) * // Spice rotation - glm::dmat4(glm::scale(glm::dmat4(1.0), glm::dvec3(transformData.scale))); + glm::scale(glm::dmat4(1.0), glm::dvec3(transformData.scale)); // scale the planet to appropriate size since the planet is a unit sphere //glm::mat4 transform = glm::mat4(1); diff --git a/modules/spacecraftinstruments/util/imagesequencer.h b/modules/spacecraftinstruments/util/imagesequencer.h index 4628696a24..d953622a6e 100644 --- a/modules/spacecraftinstruments/util/imagesequencer.h +++ b/modules/spacecraftinstruments/util/imagesequencer.h @@ -187,8 +187,6 @@ private: // current simulation time double _currentTime; - // simulation time of previous frame - double _previousTime; // time between current simulation time and an upcoming capture double _intervalLength; // next consecutive capture in time diff --git a/modules/sync/syncmodule.cpp b/modules/sync/syncmodule.cpp index c8bc6581eb..cc7e66bc5a 100644 --- a/modules/sync/syncmodule.cpp +++ b/modules/sync/syncmodule.cpp @@ -45,9 +45,7 @@ namespace { constexpr const char* KeyHttpSynchronizationRepositories = "HttpSynchronizationRepositories"; constexpr const char* KeySynchronizationRoot = "SynchronizationRoot"; - - const char* _loggerCat = "SyncModule"; -} +} // namespace namespace openspace { diff --git a/modules/sync/syncs/httpsynchronization.cpp b/modules/sync/syncs/httpsynchronization.cpp index 270d56a488..93ac3f24e2 100644 --- a/modules/sync/syncs/httpsynchronization.cpp +++ b/modules/sync/syncs/httpsynchronization.cpp @@ -127,9 +127,9 @@ void HttpSynchronization::start() { "&" + QueryKeyFileVersion + "=" + std::to_string(_version) + "&" + QueryKeyApplicationVersion + "=" + std::to_string(ApplicationVersion); - _syncThread = std::thread([this](const std::string& query) { + _syncThread = std::thread([this](const std::string& q) { for (const std::string& url : _synchronizationRepositories) { - if (trySyncFromUrl(url + query)) { + if (trySyncFromUrl(url + q)) { createSyncFile(); resolve(); return; diff --git a/modules/sync/syncs/torrentsynchronization.cpp b/modules/sync/syncs/torrentsynchronization.cpp index 99950a4734..c2de5b0333 100644 --- a/modules/sync/syncs/torrentsynchronization.cpp +++ b/modules/sync/syncs/torrentsynchronization.cpp @@ -38,7 +38,6 @@ namespace { - constexpr const char* _loggerCat = "TorrentSynchronization"; constexpr const char* KeyIdentifier = "Identifier"; constexpr const char* KeyMagnet = "Magnet"; } // namespace diff --git a/modules/sync/syncs/urlsynchronization.cpp b/modules/sync/syncs/urlsynchronization.cpp index f7a4bdc4f1..d261ae1119 100644 --- a/modules/sync/syncs/urlsynchronization.cpp +++ b/modules/sync/syncs/urlsynchronization.cpp @@ -84,7 +84,7 @@ UrlSynchronization::UrlSynchronization(const ghoul::Dictionary& dict, } else { ghoul::Dictionary urls = dict.value(KeyUrl); - for (int i = 1; i <= urls.size(); ++i) { + for (size_t i = 1; i <= urls.size(); ++i) { std::string url = urls.value(std::to_string(i)); _urls.push_back(std::move(url)); } diff --git a/modules/sync/torrentclient.cpp b/modules/sync/torrentclient.cpp index 9ae8dbae3c..1513fb1728 100644 --- a/modules/sync/torrentclient.cpp +++ b/modules/sync/torrentclient.cpp @@ -29,12 +29,23 @@ #include #ifdef SYNC_USE_LIBTORRENT +#ifdef _MSC_VER +#pragma warning (push) +#pragma warning (disable : 4265) +#pragma warning (disable : 4996) +#endif // _MSC_VER + #include #include #include #include #include #include + +#ifdef _MSC_VER +#pragma warning (pop) +#endif // _MSC_VER + #endif // SYNC_USE_LIBTORRENT namespace { @@ -44,8 +55,8 @@ namespace { namespace openspace { -TorrentError::TorrentError(std::string message) - : RuntimeError(std::move(message), "TorrentClient") +TorrentError::TorrentError(std::string msg) + : RuntimeError(std::move(msg), "TorrentClient") {} TorrentClient::~TorrentClient() { @@ -61,23 +72,35 @@ void TorrentClient::initialize() { std::to_string(openspace::OPENSPACE_VERSION_PATCH) ); + settings.set_str( + libtorrent::settings_pack::listen_interfaces, + "0.0.0.0:6881,0.0.0.0:20280,0.0.0.0:20285,0.0.0.0:20290,0.0.0.0:0" + ); settings.set_bool(libtorrent::settings_pack::allow_multiple_connections_per_ip, true); + settings.set_bool(libtorrent::settings_pack::enable_upnp, 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); settings.set_int(libtorrent::settings_pack::active_limit, 30); + + settings.set_str( + libtorrent::settings_pack::dht_bootstrap_nodes, + "router.utorrent.com,dht.transmissionbt.com,router.bittorrent.com,\ +router.bitcomet.com" + ); settings.set_int(libtorrent::settings_pack::dht_announce_interval, 15); + _session.apply_settings(settings); - _session.add_dht_router({ "router.utorrent.com", 6881 }); - _session.add_dht_router({ "dht.transmissionbt.com", 6881 }); - _session.add_dht_router({ "router.bittorrent.com", 6881 }); - _session.add_dht_router({ "router.bitcomet.com", 6881 }); + //_session.add_dht_router({ "router.utorrent.com", 6881 }); + //_session.add_dht_router({ "dht.transmissionbt.com", 6881 }); + //_session.add_dht_router({ "router.bittorrent.com", 6881 }); + //_session.add_dht_router({ "router.bitcomet.com", 6881 }); libtorrent::error_code ec; - _session.listen_on(std::make_pair(20280, 20290), ec); - _session.start_upnp(); + //_session.listen_on(std::make_pair(20280, 20290), ec); + //_session.start_upnp(); _isInitialized = true; @@ -164,7 +187,7 @@ TorrentClient::TorrentId TorrentClient::addTorrentFile(const std::string& torren libtorrent::error_code ec; libtorrent::add_torrent_params p; p.save_path = destination; - p.ti = std::make_shared(torrentFile, ec, 0); + p.ti = std::make_shared(torrentFile, ec); if (ec) { LERROR(torrentFile << ": " << ec.message()); } diff --git a/modules/sync/torrentclient.h b/modules/sync/torrentclient.h index 96cc77ce8a..10568da4b9 100644 --- a/modules/sync/torrentclient.h +++ b/modules/sync/torrentclient.h @@ -35,9 +35,20 @@ #include #ifdef SYNC_USE_LIBTORRENT +#ifdef _MSC_VER +#pragma warning (push) +#pragma warning (disable : 4265) +#pragma warning (disable : 4996) +#endif // _MSC_VER + #include #include +#ifdef _MSC_VER +#pragma warning (pop) +#endif // _MSC_VER + + #else // SYNC_USE_LIBTORRENT // Dummy definition to make TorrentClient compile, these is not actually used if // SYNC_USE_LIBTORRENT is FALSE diff --git a/modules/volume/rendering/basicvolumeraycaster.cpp b/modules/volume/rendering/basicvolumeraycaster.cpp index e08139d762..8092bb6c3c 100644 --- a/modules/volume/rendering/basicvolumeraycaster.cpp +++ b/modules/volume/rendering/basicvolumeraycaster.cpp @@ -46,9 +46,9 @@ BasicVolumeRaycaster::BasicVolumeRaycaster( std::shared_ptr volumeTexture, std::shared_ptr transferFunction, std::shared_ptr clipPlanes) - : _volumeTexture(volumeTexture) + : _clipPlanes(clipPlanes) + , _volumeTexture(volumeTexture) , _transferFunction(transferFunction) - , _clipPlanes(clipPlanes) , _boundingBox(glm::vec3(1.0)) , _opacity(20.0) , _rNormalization(0.0) diff --git a/modules/volume/rendering/renderabletimevaryingvolume.cpp b/modules/volume/rendering/renderabletimevaryingvolume.cpp index 15dba61811..ea48521273 100644 --- a/modules/volume/rendering/renderabletimevaryingvolume.cpp +++ b/modules/volume/rendering/renderabletimevaryingvolume.cpp @@ -156,21 +156,21 @@ namespace volume { RenderableTimeVaryingVolume::RenderableTimeVaryingVolume( const ghoul::Dictionary& dictionary) : Renderable(dictionary) + , _gridType(GridTypeInfo, properties::OptionProperty::DisplayType::Dropdown) , _clipPlanes(nullptr) , _stepSize(StepSizeInfo, 0.02f, 0.001f, 1.f) - , _gridType(GridTypeInfo, properties::OptionProperty::DisplayType::Dropdown) + , _opacity(OpacityInfo, 10.f, 0.f, 500.f) + , _rNormalization(rNormalizationInfo, 0.f, 0.f, 2.f) + , _rUpperBound(rUpperBoundInfo, 1.f, 0.f, 2.f) , _secondsBefore(SecondsBeforeInfo, 0.f, 0.01f, SecondsInOneDay) , _secondsAfter(SecondsAfterInfo, 0.f, 0.01f, SecondsInOneDay) , _sourceDirectory(SourceDirectoryInfo) , _transferFunctionPath(TransferFunctionInfo) + , _lowerValueBound(lowerValueBoundInfo, 0.f, 0.f, 1000000.f) + , _upperValueBound(upperValueBoundInfo, 0.f, 0.f, 1000000.f) , _triggerTimeJump(TriggerTimeJumpInfo) , _jumpToTimestep(JumpToTimestepInfo, 0, 0, 256) , _currentTimestep(CurrentTimeStepInfo, 0, 0, 256) - , _opacity(OpacityInfo, 10.f, 0.f, 500.f) - , _rNormalization(rNormalizationInfo, 0.f, 0.f, 2.f) - , _rUpperBound(rUpperBoundInfo, 1.f, 0.f, 2.f) - , _lowerValueBound(lowerValueBoundInfo, 0.f, 0.f, 1000000.f) - , _upperValueBound(upperValueBoundInfo, 0.f, 0.f, 1000000.f) , _raycaster(nullptr) , _transferFunction(nullptr) { @@ -368,7 +368,6 @@ void RenderableTimeVaryingVolume::loadTimestepMetadata(const std::string& path) } RenderableTimeVaryingVolume::Timestep* RenderableTimeVaryingVolume::currentTimestep() { - using TimeStep = RenderableTimeVaryingVolume::Timestep; if (_volumeTimesteps.size() == 0) { return nullptr; } diff --git a/modules/volume/textureslicevolumereader.inl b/modules/volume/textureslicevolumereader.inl index 5a6c2fbd71..708d434777 100644 --- a/modules/volume/textureslicevolumereader.inl +++ b/modules/volume/textureslicevolumereader.inl @@ -43,9 +43,10 @@ TextureSliceVolumeReader::TextureSliceVolumeReader( std::vector paths, size_t sliceCacheNIndices, size_t sliceCacheCapacity) - : _initialized(false) - , _paths(paths) - , _cache(sliceCacheCapacity, sliceCacheNIndices) {} + : _paths(paths) + , _cache(sliceCacheCapacity, sliceCacheNIndices) + , _initialized(false) +{} template void TextureSliceVolumeReader::initialize() { @@ -70,8 +71,10 @@ ghoul::opengl::Texture& TextureSliceVolumeReader::getSlice(int sliceIndex) const { ghoul_assert(_initialized, "Volume is not initialized"); - ghoul_assert(sliceIndex >= 0 && sliceIndex < _paths.size(), - "Slice index " + std::to_string(sliceIndex) + "is outside the range."); + ghoul_assert( + sliceIndex >= 0 && sliceIndex < static_cast(_paths.size()), + "Slice index " + std::to_string(sliceIndex) + "is outside the range." + ); if (!_cache.has(sliceIndex)) { std::shared_ptr texture = diff --git a/openspace.cfg b/openspace.cfg index 194a3b2424..03d39ffdc5 100644 --- a/openspace.cfg +++ b/openspace.cfg @@ -61,8 +61,7 @@ return { LOGS = "${BASE}/logs", MODULES = "${BASE}/modules", SCRIPTS = "${BASE}/scripts", - SHADERS = "${BASE}/shaders", - TESTDIR = "${BASE}/tests" + SHADERS = "${BASE}/shaders" }, Fonts = { Mono = "${FONTS}/Bitstream-Vera-Sans-Mono/VeraMono.ttf", diff --git a/src/properties/optionproperty.cpp b/src/properties/optionproperty.cpp index 169118d93d..874caa07ef 100644 --- a/src/properties/optionproperty.cpp +++ b/src/properties/optionproperty.cpp @@ -82,11 +82,11 @@ void OptionProperty::clearOptions() { void OptionProperty::setValue(int value) { // Check if the passed value belongs to any option - for (int i = 0; i < _options.size(); ++i) { + for (size_t i = 0; i < _options.size(); ++i) { const Option& o = _options[i]; if (o.value == value) { // If it does, set it by calling the superclasses setValue method - NumericalProperty::setValue(i); + NumericalProperty::setValue(static_cast(i)); return; } } @@ -96,7 +96,7 @@ void OptionProperty::setValue(int value) { } bool OptionProperty::hasOption() const { - return value() >= 0 && value() < _options.size(); + return value() >= 0 && value() < static_cast(_options.size()); } diff --git a/src/rendering/abufferrenderer.cpp b/src/rendering/abufferrenderer.cpp index f620c7cbb9..7cf0de7b5f 100644 --- a/src/rendering/abufferrenderer.cpp +++ b/src/rendering/abufferrenderer.cpp @@ -67,9 +67,9 @@ ABufferRenderer::ABufferRenderer() , _dirtyRaycastData(true) , _dirtyResolveDictionary(true) , _resolveProgram(nullptr) - , _hdrExposure(0.4) - , _hdrBackground(2.8) - , _gamma(2.2) + , _hdrExposure(0.4f) + , _hdrBackground(2.8f) + , _gamma(2.2f) {} ABufferRenderer::~ABufferRenderer() {} diff --git a/src/scene/assetloader.cpp b/src/scene/assetloader.cpp index b69063f9ee..1b2351bb1a 100644 --- a/src/scene/assetloader.cpp +++ b/src/scene/assetloader.cpp @@ -82,7 +82,7 @@ namespace { return PathType::Absolute; } return PathType::RelativeToAssetRoot; - }; + } } namespace openspace { @@ -671,7 +671,7 @@ int AssetLoader::requestLua(Asset* parent) { return 1; } -int AssetLoader::existsLua(Asset* asset) { +int AssetLoader::existsLua(Asset*) { ghoul::lua::checkArgumentsAndThrow(*_luaState, 1, "lua::exists"); std::string assetName = luaL_checkstring(*_luaState, 1); diff --git a/src/scene/scale.cpp b/src/scene/scale.cpp index 9a439d9d56..1ff97c945e 100644 --- a/src/scene/scale.cpp +++ b/src/scene/scale.cpp @@ -76,8 +76,8 @@ std::unique_ptr Scale::createFromDictionary(const ghoul::Dictionary& dict Scale::Scale() : properties::PropertyOwner({ "Scale" }) - , _cachedScale(1.0) , _needsUpdate(true) + , _cachedScale(1.0) {} bool Scale::initialize() { diff --git a/src/scene/translation.cpp b/src/scene/translation.cpp index 70bc178eb4..f1a7008251 100644 --- a/src/scene/translation.cpp +++ b/src/scene/translation.cpp @@ -73,8 +73,8 @@ std::unique_ptr Translation::createFromDictionary( Translation::Translation() : properties::PropertyOwner({ "Translation" }) - , _cachedPosition(glm::dvec3(0.0)) , _needsUpdate(true) + , _cachedPosition(glm::dvec3(0.0)) {} bool Translation::initialize() { diff --git a/src/util/httprequest.cpp b/src/util/httprequest.cpp index e4e768f83d..b88a861a90 100644 --- a/src/util/httprequest.cpp +++ b/src/util/httprequest.cpp @@ -369,7 +369,7 @@ bool HttpFileDownload::initDownload() { LERROR("Cannot open file " << destinationFile); return false; } -#endif +#else if (errno) { #if defined(__unix__) char buffer[255]; @@ -389,6 +389,7 @@ bool HttpFileDownload::initDownload() { LERROR("Cannot open file " << destinationFile); return false; +#endif } return true; } diff --git a/src/util/resourcesynchronization.cpp b/src/util/resourcesynchronization.cpp index 200ce6d115..a088d1e114 100644 --- a/src/util/resourcesynchronization.cpp +++ b/src/util/resourcesynchronization.cpp @@ -38,7 +38,6 @@ namespace { constexpr const char* KeyType = "Type"; constexpr const char* KeyName = "Name"; - constexpr const char* _loggerCat = "ResourceSynchronization"; } // namespace namespace openspace { diff --git a/src/util/transformationmanager.cpp b/src/util/transformationmanager.cpp index 335a30dc7b..eba2959ee3 100644 --- a/src/util/transformationmanager.cpp +++ b/src/util/transformationmanager.cpp @@ -26,9 +26,9 @@ #include #include - namespace { - constexpr const char* _loggerCat = "TransformationManager"; - } // namespace +namespace { + constexpr const char* _loggerCat = "TransformationManager"; +} // namespace namespace openspace { diff --git a/tests/regression/517.inl b/tests/regression/517.inl index a4a1ecd104..774f842459 100644 --- a/tests/regression/517.inl +++ b/tests/regression/517.inl @@ -24,14 +24,11 @@ #include -using namespace openspace::properties; - class Issue527 : public testing::Test {}; TEST_F(Issue527, Regression) { // Error in OptionProperty if values not starting at 0 are used - - OptionProperty p({ "id", "gui", "desc"}); + openspace::properties::OptionProperty p({ "id", "gui", "desc"}); p.addOptions({ {-1, "a" }, diff --git a/tests/test_optionproperty.inl b/tests/test_optionproperty.inl index 5a82ffe71b..341d351bcf 100644 --- a/tests/test_optionproperty.inl +++ b/tests/test_optionproperty.inl @@ -24,18 +24,16 @@ #include -using namespace openspace::properties; - class OptionPropertyTest : public testing::Test {}; TEST_F(OptionPropertyTest, NoOption) { - OptionProperty p({ "id", "gui", "desc" }); + openspace::properties::OptionProperty p({ "id", "gui", "desc" }); ASSERT_EQ(false, p.hasOption()); } TEST_F(OptionPropertyTest, SingleOptionSingleZero) { - OptionProperty p({ "id", "gui", "desc"}); + openspace::properties::OptionProperty p({ "id", "gui", "desc"}); p.addOption(0, "a"); @@ -46,7 +44,7 @@ TEST_F(OptionPropertyTest, SingleOptionSingleZero) { } TEST_F(OptionPropertyTest, SingleOptionSingleNegative) { - OptionProperty p({ "id", "gui", "desc" }); + openspace::properties::OptionProperty p({ "id", "gui", "desc" }); p.addOption(-1, "a"); p = -1; @@ -56,7 +54,7 @@ TEST_F(OptionPropertyTest, SingleOptionSingleNegative) { } TEST_F(OptionPropertyTest, SingleOptionSinglePositive) { - OptionProperty p({ "id", "gui", "desc" }); + openspace::properties::OptionProperty p({ "id", "gui", "desc" }); p.addOptions({ { 1, "a" } @@ -68,7 +66,7 @@ TEST_F(OptionPropertyTest, SingleOptionSinglePositive) { } TEST_F(OptionPropertyTest, SingleOptionMultipleZero) { - OptionProperty p({ "id", "gui", "desc" }); + openspace::properties::OptionProperty p({ "id", "gui", "desc" }); p.addOptions({ { 0, "a" } @@ -80,7 +78,7 @@ TEST_F(OptionPropertyTest, SingleOptionMultipleZero) { } TEST_F(OptionPropertyTest, SingleOptionMultipleNegative) { - OptionProperty p({ "id", "gui", "desc" }); + openspace::properties::OptionProperty p({ "id", "gui", "desc" }); p.addOptions({ { -1, "a" } @@ -92,7 +90,7 @@ TEST_F(OptionPropertyTest, SingleOptionMultipleNegative) { } TEST_F(OptionPropertyTest, SingleOptionMultiplePositive) { - OptionProperty p({ "id", "gui", "desc" }); + openspace::properties::OptionProperty p({ "id", "gui", "desc" }); p.addOptions({ { 1, "a" } @@ -104,7 +102,7 @@ TEST_F(OptionPropertyTest, SingleOptionMultiplePositive) { } TEST_F(OptionPropertyTest, SingleOptionsZeroBasedConsecutive) { - OptionProperty p({ "id", "gui", "desc" }); + openspace::properties::OptionProperty p({ "id", "gui", "desc" }); p.addOption(0, "a"); p.addOption(1, "b"); @@ -124,7 +122,7 @@ TEST_F(OptionPropertyTest, SingleOptionsZeroBasedConsecutive) { } TEST_F(OptionPropertyTest, SingleOptionsZeroBasedNonConsecutive) { - OptionProperty p({ "id", "gui", "desc" }); + openspace::properties::OptionProperty p({ "id", "gui", "desc" }); p.addOption(0, "a"); p.addOption(2, "b"); @@ -144,7 +142,7 @@ TEST_F(OptionPropertyTest, SingleOptionsZeroBasedNonConsecutive) { } TEST_F(OptionPropertyTest, SingleOptionsNegativeBasedConsecutive) { - OptionProperty p({ "id", "gui", "desc" }); + openspace::properties::OptionProperty p({ "id", "gui", "desc" }); p.addOption(-1, "a"); p.addOption(-2, "b"); @@ -164,7 +162,7 @@ TEST_F(OptionPropertyTest, SingleOptionsNegativeBasedConsecutive) { } TEST_F(OptionPropertyTest, SingleOptionsNonZeroBasedNonConsecutive) { - OptionProperty p({ "id", "gui", "desc" }); + openspace::properties::OptionProperty p({ "id", "gui", "desc" }); p.addOption(-1, "a"); p.addOption(-3, "b"); @@ -184,7 +182,7 @@ TEST_F(OptionPropertyTest, SingleOptionsNonZeroBasedNonConsecutive) { } TEST_F(OptionPropertyTest, SingleOptionsZeroBasedAlternating) { - OptionProperty p({ "id", "gui", "desc" }); + openspace::properties::OptionProperty p({ "id", "gui", "desc" }); p.addOption(0, "a"); p.addOption(2, "b"); @@ -204,7 +202,7 @@ TEST_F(OptionPropertyTest, SingleOptionsZeroBasedAlternating) { } TEST_F(OptionPropertyTest, SingleOptionsNonZeroBasedAlternating) { - OptionProperty p({ "id", "gui", "desc" }); + openspace::properties::OptionProperty p({ "id", "gui", "desc" }); p.addOption(-20, "a"); p.addOption(2, "b");