Commit 78b0d771 authored by Alexander Bock's avatar Alexander Bock
Browse files

Start removing warnings

parent f07f246c
Showing with 17 additions and 15 deletions
+17 -15
...@@ -66,7 +66,7 @@ int Distance::getDesiredLevel(const Chunk& chunk, const RenderData& data) const ...@@ -66,7 +66,7 @@ int Distance::getDesiredLevel(const Chunk& chunk, const RenderData& data) const
double scaleFactor = double scaleFactor =
globe.generalProperties().lodScaleFactor * ellipsoid.minimumRadius(); globe.generalProperties().lodScaleFactor * ellipsoid.minimumRadius();
double projectedScaleFactor = scaleFactor / distance; double projectedScaleFactor = scaleFactor / distance;
int desiredLevel = ceil(log2(projectedScaleFactor)); int desiredLevel = static_cast<int>(ceil(log2(projectedScaleFactor)));
return desiredLevel; return desiredLevel;
} }
......
...@@ -27,6 +27,8 @@ ...@@ -27,6 +27,8 @@
#include <modules/globebrowsing/geometry/angle.h> #include <modules/globebrowsing/geometry/angle.h>
#include <modules/globebrowsing/tile/tileindex.h> #include <modules/globebrowsing/tile/tileindex.h>
#include <ghoul/misc/assert.h>
namespace openspace { namespace openspace {
namespace globebrowsing { namespace globebrowsing {
...@@ -90,6 +92,7 @@ Geodetic2 GeodeticPatch::getCorner(Quad q) const { ...@@ -90,6 +92,7 @@ Geodetic2 GeodeticPatch::getCorner(Quad q) const {
case NORTH_EAST: return Geodetic2(maxLat(), maxLon());// northEastCorner(); case NORTH_EAST: return Geodetic2(maxLat(), maxLon());// northEastCorner();
case SOUTH_WEST: return Geodetic2(minLat(), minLon());// southWestCorner(); case SOUTH_WEST: return Geodetic2(minLat(), minLon());// southWestCorner();
case SOUTH_EAST: return Geodetic2(minLat(), maxLon());// southEastCorner(); case SOUTH_EAST: return Geodetic2(minLat(), maxLon());// southEastCorner();
default: ghoul_assert(false, "Missing case label");
} }
} }
......
...@@ -241,6 +241,8 @@ int PixelRegion::edge(Side side) const { ...@@ -241,6 +241,8 @@ int PixelRegion::edge(Side side) const {
return start.x + numPixels.x; return start.x + numPixels.x;
case Side::BOTTOM: case Side::BOTTOM:
return start.y + numPixels.y; return start.y + numPixels.y;
default:
ghoul_assert(false, "Missing case label");
} }
} }
......
...@@ -37,7 +37,7 @@ class DataProcessor{ ...@@ -37,7 +37,7 @@ class DataProcessor{
friend class IswaBaseGroup; friend class IswaBaseGroup;
public: public:
DataProcessor(); DataProcessor();
~DataProcessor(); virtual ~DataProcessor();
virtual std::vector<std::string> readMetadata(std::string data, glm::size3_t& dimensions) = 0; virtual std::vector<std::string> readMetadata(std::string data, glm::size3_t& dimensions) = 0;
virtual void addDataValues(std::string data, properties::SelectionProperty& dataOptions) = 0; virtual void addDataValues(std::string data, properties::SelectionProperty& dataOptions) = 0;
...@@ -50,6 +50,7 @@ public: ...@@ -50,6 +50,7 @@ public:
glm::vec2 filterValues(); glm::vec2 filterValues();
void clear(); void clear();
protected: protected:
float processDataPoint(float value, int option); float processDataPoint(float value, int option);
float normalizeWithStandardScore(float value, float mean, float sd, glm::vec2 normalizationValues = glm::vec2(1.0f, 1.0f)); float normalizeWithStandardScore(float value, float mean, float sd, glm::vec2 normalizationValues = glm::vec2(1.0f, 1.0f));
......
...@@ -32,7 +32,7 @@ namespace openspace { ...@@ -32,7 +32,7 @@ namespace openspace {
class DataProcessorJson : public DataProcessor { class DataProcessorJson : public DataProcessor {
public: public:
DataProcessorJson(); DataProcessorJson();
~DataProcessorJson(); virtual ~DataProcessorJson();
virtual std::vector<std::string> readMetadata(std::string data, glm::size3_t& dimensions) override; virtual std::vector<std::string> readMetadata(std::string data, glm::size3_t& dimensions) override;
virtual void addDataValues(std::string data, properties::SelectionProperty& dataOptions) override; virtual void addDataValues(std::string data, properties::SelectionProperty& dataOptions) override;
......
...@@ -53,19 +53,20 @@ create_new_module( ...@@ -53,19 +53,20 @@ create_new_module(
add_subdirectory(${KAMELEON_ROOT_DIR}) add_subdirectory(${KAMELEON_ROOT_DIR})
target_include_directories(${kameleon_module} SYSTEM PUBLIC ${KAMELEON_INCLUDES}) target_include_directories(${kameleon_module} SYSTEM PUBLIC ${KAMELEON_INCLUDES})
target_link_libraries(${kameleon_module} ccmc) target_link_libraries(${kameleon_module} ccmc)
if (OPENSPACE_DISABLE_EXTERNAL_WARNINGS) if (GHOUL_DISABLE_EXTERNAL_WARNINGS)
if (MSVC) if (MSVC)
target_compile_options(ccmc PRIVATE "/W0" "/MP") target_compile_options(ccmc PRIVATE "/W0" "/MP")
target_compile_definitions(ccmc PRIVATE "_SCL_SECURE_NO_WARNINGS")
else () else ()
target_compile_options(ccmc PRIVATE "-w") target_compile_options(ccmc PRIVATE "-w")
endif () endif ()
target_compile_definitions(ccmc PUBLIC "_SCL_SECURE_NO_WARNINGS")
endif () endif ()
set_property(TARGET ccmc PROPERTY FOLDER "External") set_property(TARGET ccmc PROPERTY FOLDER "External")
if (TARGET cdf) if (TARGET cdf)
if (GHOUL_DISABLE_EXTERNAL_WARNINGS) if (GHOUL_DISABLE_EXTERNAL_WARNINGS)
if (MSVC) if (MSVC)
target_compile_options(cdf PRIVATE "/W0" "/MP") target_compile_options(cdf PRIVATE "/W0" "/MP")
target_compile_definitions(cdf PRIVATE "_SCL_SECURE_NO_WARNINGS")
else () else ()
target_compile_options(cdf PRIVATE "-w") target_compile_options(cdf PRIVATE "-w")
endif () endif ()
......
...@@ -492,7 +492,6 @@ void RenderableFov::computeIntercepts(const UpdateData& data, const std::string& ...@@ -492,7 +492,6 @@ void RenderableFov::computeIntercepts(const UpdateData& data, const std::string&
// An early out for when the target is not in field of view // An early out for when the target is not in field of view
if (!isInFov) { if (!isInFov) {
for (size_t i = 0; i < _instrument.bounds.size(); ++i) { for (size_t i = 0; i < _instrument.bounds.size(); ++i) {
const glm::dvec3& bound = _instrument.bounds[i];
// If none of the points are able to intersect with the target, we can just // If none of the points are able to intersect with the target, we can just
// copy the values from the field-of-view boundary. So we take each second // copy the values from the field-of-view boundary. So we take each second
// item (the first one is (0,0,0)) and replicate it 'InterpolationSteps' times // item (the first one is (0,0,0)) and replicate it 'InterpolationSteps' times
......
...@@ -379,7 +379,7 @@ void RenderableModelProjection::attitudeParameters(double time) { ...@@ -379,7 +379,7 @@ void RenderableModelProjection::attitudeParameters(double time) {
try { try {
SpiceManager::FieldOfViewResult res = SpiceManager::ref().fieldOfView(_projectionComponent.instrumentId()); SpiceManager::FieldOfViewResult res = SpiceManager::ref().fieldOfView(_projectionComponent.instrumentId());
boresight = std::move(res.boresightVector); boresight = std::move(res.boresightVector);
} catch (const SpiceManager::SpiceException& e) { } catch (const SpiceManager::SpiceException&) {
return; return;
} }
......
...@@ -313,9 +313,6 @@ void RenderablePlaneProjection::setTarget(std::string body) { ...@@ -313,9 +313,6 @@ void RenderablePlaneProjection::setTarget(std::string body) {
return; return;
std::vector<SceneGraphNode*> nodes = OsEng.renderEngine().scene()->allSceneGraphNodes(); std::vector<SceneGraphNode*> nodes = OsEng.renderEngine().scene()->allSceneGraphNodes();
Renderable* possibleTarget;
bool hasBody, found = false;
std::string targetBody;
_target.body = body; _target.body = body;
_target.frame = openspace::SpiceManager::ref().frameFromBody(body); _target.frame = openspace::SpiceManager::ref().frameFromBody(body);
...@@ -326,15 +323,11 @@ std::string RenderablePlaneProjection::findClosestTarget(double currentTime) { ...@@ -326,15 +323,11 @@ std::string RenderablePlaneProjection::findClosestTarget(double currentTime) {
std::vector<std::string> targets; std::vector<std::string> targets;
std::vector<SceneGraphNode*> nodes = OsEng.renderEngine().scene()->allSceneGraphNodes(); std::vector<SceneGraphNode*> nodes = OsEng.renderEngine().scene()->allSceneGraphNodes();
Renderable* possibleTarget;
std::string targetBody; std::string targetBody;
bool hasBody, found = false;
PowerScaledScalar min = PowerScaledScalar::CreatePSS(REALLY_FAR); PowerScaledScalar min = PowerScaledScalar::CreatePSS(REALLY_FAR);
PowerScaledScalar distance = PowerScaledScalar::CreatePSS(0.0); PowerScaledScalar distance = PowerScaledScalar::CreatePSS(0.0);
return targetBody; return targetBody;
} }
......
...@@ -313,6 +313,7 @@ double HongKangParser::getETfromMet(double met) { ...@@ -313,6 +313,7 @@ double HongKangParser::getETfromMet(double met) {
} else if (met < _metRef) { } else if (met < _metRef) {
return referenceET - diff; return referenceET - diff;
} }
return 0.0;
} }
double HongKangParser::getMetFromET(double et) { double HongKangParser::getMetFromET(double et) {
...@@ -321,9 +322,10 @@ double HongKangParser::getMetFromET(double et) { ...@@ -321,9 +322,10 @@ double HongKangParser::getMetFromET(double et) {
if (et >= referenceET) { if (et >= referenceET) {
return _metRef + (et - referenceET); return _metRef + (et - referenceET);
}else { } else {
return _metRef - (referenceET - et); return _metRef - (referenceET - et);
} }
return 0.0;
} }
} // namespace openspace } // namespace openspace
...@@ -52,6 +52,7 @@ struct ImageSubset { ...@@ -52,6 +52,7 @@ struct ImageSubset {
class SequenceParser { class SequenceParser {
public: public:
virtual ~SequenceParser() = default;
virtual bool create() = 0; virtual bool create() = 0;
virtual std::map<std::string, ImageSubset> getSubsetMap() final; virtual std::map<std::string, ImageSubset> getSubsetMap() final;
virtual std::vector<std::pair<std::string, TimeRange>> getInstrumentTimes() final; virtual std::vector<std::pair<std::string, TimeRange>> getInstrumentTimes() final;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment