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
double scaleFactor =
globe.generalProperties().lodScaleFactor * ellipsoid.minimumRadius();
double projectedScaleFactor = scaleFactor / distance;
int desiredLevel = ceil(log2(projectedScaleFactor));
int desiredLevel = static_cast<int>(ceil(log2(projectedScaleFactor)));
return desiredLevel;
}
......
......@@ -27,6 +27,8 @@
#include <modules/globebrowsing/geometry/angle.h>
#include <modules/globebrowsing/tile/tileindex.h>
#include <ghoul/misc/assert.h>
namespace openspace {
namespace globebrowsing {
......@@ -90,6 +92,7 @@ Geodetic2 GeodeticPatch::getCorner(Quad q) const {
case NORTH_EAST: return Geodetic2(maxLat(), maxLon());// northEastCorner();
case SOUTH_WEST: return Geodetic2(minLat(), minLon());// southWestCorner();
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 {
return start.x + numPixels.x;
case Side::BOTTOM:
return start.y + numPixels.y;
default:
ghoul_assert(false, "Missing case label");
}
}
......
......@@ -37,7 +37,7 @@ class DataProcessor{
friend class IswaBaseGroup;
public:
DataProcessor();
~DataProcessor();
virtual ~DataProcessor();
virtual std::vector<std::string> readMetadata(std::string data, glm::size3_t& dimensions) = 0;
virtual void addDataValues(std::string data, properties::SelectionProperty& dataOptions) = 0;
......@@ -50,6 +50,7 @@ public:
glm::vec2 filterValues();
void clear();
protected:
float processDataPoint(float value, int option);
float normalizeWithStandardScore(float value, float mean, float sd, glm::vec2 normalizationValues = glm::vec2(1.0f, 1.0f));
......
......@@ -32,7 +32,7 @@ namespace openspace {
class DataProcessorJson : public DataProcessor {
public:
DataProcessorJson();
~DataProcessorJson();
virtual ~DataProcessorJson();
virtual std::vector<std::string> readMetadata(std::string data, glm::size3_t& dimensions) override;
virtual void addDataValues(std::string data, properties::SelectionProperty& dataOptions) override;
......
......@@ -53,19 +53,20 @@ create_new_module(
add_subdirectory(${KAMELEON_ROOT_DIR})
target_include_directories(${kameleon_module} SYSTEM PUBLIC ${KAMELEON_INCLUDES})
target_link_libraries(${kameleon_module} ccmc)
if (OPENSPACE_DISABLE_EXTERNAL_WARNINGS)
if (GHOUL_DISABLE_EXTERNAL_WARNINGS)
if (MSVC)
target_compile_options(ccmc PRIVATE "/W0" "/MP")
target_compile_definitions(ccmc PRIVATE "_SCL_SECURE_NO_WARNINGS")
else ()
target_compile_options(ccmc PRIVATE "-w")
endif ()
target_compile_definitions(ccmc PUBLIC "_SCL_SECURE_NO_WARNINGS")
endif ()
set_property(TARGET ccmc PROPERTY FOLDER "External")
if (TARGET cdf)
if (GHOUL_DISABLE_EXTERNAL_WARNINGS)
if (MSVC)
target_compile_options(cdf PRIVATE "/W0" "/MP")
target_compile_definitions(cdf PRIVATE "_SCL_SECURE_NO_WARNINGS")
else ()
target_compile_options(cdf PRIVATE "-w")
endif ()
......
......@@ -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
if (!isInFov) {
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
// 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
......
......@@ -379,7 +379,7 @@ void RenderableModelProjection::attitudeParameters(double time) {
try {
SpiceManager::FieldOfViewResult res = SpiceManager::ref().fieldOfView(_projectionComponent.instrumentId());
boresight = std::move(res.boresightVector);
} catch (const SpiceManager::SpiceException& e) {
} catch (const SpiceManager::SpiceException&) {
return;
}
......
......@@ -313,9 +313,6 @@ void RenderablePlaneProjection::setTarget(std::string body) {
return;
std::vector<SceneGraphNode*> nodes = OsEng.renderEngine().scene()->allSceneGraphNodes();
Renderable* possibleTarget;
bool hasBody, found = false;
std::string targetBody;
_target.body = body;
_target.frame = openspace::SpiceManager::ref().frameFromBody(body);
......@@ -326,15 +323,11 @@ std::string RenderablePlaneProjection::findClosestTarget(double currentTime) {
std::vector<std::string> targets;
std::vector<SceneGraphNode*> nodes = OsEng.renderEngine().scene()->allSceneGraphNodes();
Renderable* possibleTarget;
std::string targetBody;
bool hasBody, found = false;
PowerScaledScalar min = PowerScaledScalar::CreatePSS(REALLY_FAR);
PowerScaledScalar distance = PowerScaledScalar::CreatePSS(0.0);
return targetBody;
}
......
......@@ -313,6 +313,7 @@ double HongKangParser::getETfromMet(double met) {
} else if (met < _metRef) {
return referenceET - diff;
}
return 0.0;
}
double HongKangParser::getMetFromET(double et) {
......@@ -321,9 +322,10 @@ double HongKangParser::getMetFromET(double et) {
if (et >= referenceET) {
return _metRef + (et - referenceET);
}else {
} else {
return _metRef - (referenceET - et);
}
return 0.0;
}
} // namespace openspace
......@@ -52,6 +52,7 @@ struct ImageSubset {
class SequenceParser {
public:
virtual ~SequenceParser() = default;
virtual bool create() = 0;
virtual std::map<std::string, ImageSubset> getSubsetMap() 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