diff --git a/src/rendering/stars/renderablestars.cpp b/src/rendering/stars/renderablestars.cpp index e34e6aa8cf..41e3eb230b 100644 --- a/src/rendering/stars/renderablestars.cpp +++ b/src/rendering/stars/renderablestars.cpp @@ -44,7 +44,6 @@ #define _USE_MATH_DEFINES #include -#define printOpenGLError() printOglError(__FILE__, __LINE__) int printOglError(char *file, int line){ GLenum glErr; int retCode = 0; @@ -96,14 +95,15 @@ RenderableStars::~RenderableStars(){ std::ifstream& RenderableStars::skipToLine(std::ifstream& file, unsigned int num){ file.seekg(std::ios::beg); - for (int i = 0; i < num - 1; ++i){ + for (size_t i = 0; i < num - 1; ++i){ file.ignore(std::numeric_limits::max(), '\n'); } return file; } //these two methods exist only to debug geom shaders code. -float log10(float x){ return log(x)/ log(10); } +float log10(float x){ return log(x)/ log(10.f); } + psc psc_addition(psc v1, psc v2) { float k = 10.f; float ds = v2[3] - v1[3]; @@ -240,7 +240,7 @@ bool RenderableStars::readSpeckFile(const std::string& path){ } } v_stride = 7; // stride in VBO, set manually for now. - v_size = starcluster.size(); // size of VBO + v_size = static_cast(starcluster.size()); // size of VBO v_total = v_size / v_stride; // total number of vertecies // create vao and interleaved vbo from vectors internal array @@ -308,7 +308,7 @@ bool RenderableStars::deinitialize(){ //#define TMAT void RenderableStars::render(const RenderData& data){ assert(_haloProgram); - printOpenGLError(); + //printOpenGLError(); // activate shader _haloProgram->activate(); diff --git a/src/util/spicemanager.cpp b/src/util/spicemanager.cpp index 87927adbf8..e70c460a6b 100644 --- a/src/util/spicemanager.cpp +++ b/src/util/spicemanager.cpp @@ -248,7 +248,7 @@ bool SpiceManager::getTargetPosition(const std::string& target, const std::string& observer, glm::dvec3& targetPosition, double& lightTime) const{ - double pos[3] = { NULL, NULL, NULL }; + double pos[3] = { 0.0, 0.0, 0.0 }; spkpos_c(target.c_str(), ephemerisTime, referenceFrame.c_str(), aberrationCorrection.c_str(), observer.c_str(), pos, &lightTime); @@ -340,7 +340,7 @@ bool SpiceManager::getFieldOfView(const std::string& naifInstrumentId, for (int i = 0; i < maxVectors; i++){ for (int j = 0; j < 3; j++){ - boundsArr[j + i*3] = NULL; + boundsArr[j + i*3] = 0.0; } }