mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2025-12-31 00:10:44 -06:00
Address Visual Studio analyzer warnings
This commit is contained in:
@@ -9,7 +9,3 @@ charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
insert_final_newline = true
|
||||
|
||||
# overwrite default settings here, for instance like this:
|
||||
# [*.cpp]
|
||||
# indent_style = tabs
|
||||
|
||||
Submodule apps/OpenSpace/ext/sgct updated: 0dec32d871...7ced19201b
Submodule ext/ghoul updated: fd128fba7d...dd8a42a1b3
@@ -61,10 +61,10 @@ public:
|
||||
};
|
||||
|
||||
struct MemoryFile {
|
||||
char* buffer;
|
||||
size_t size;
|
||||
char* buffer = nullptr;
|
||||
size_t size = 0;
|
||||
std::string format;
|
||||
bool corrupted;
|
||||
bool corrupted = false;
|
||||
};
|
||||
|
||||
BooleanType(UseMultipleThreads);
|
||||
|
||||
@@ -49,7 +49,7 @@ private:
|
||||
// Input from mouse
|
||||
std::vector<MouseButton> _mouseButtonsDown;
|
||||
glm::dvec2 _mousePosition = glm::dvec2(0.0);
|
||||
double _mouseScrollDelta;
|
||||
double _mouseScrollDelta = 0.0;
|
||||
};
|
||||
|
||||
} // namespace openspace::interaction
|
||||
|
||||
@@ -125,7 +125,7 @@ private:
|
||||
std::atomic<bool> _timeTimelineChanged;
|
||||
std::mutex _latencyMutex;
|
||||
std::deque<double> _latencyDiffs;
|
||||
double _initialTimeDiff;
|
||||
double _initialTimeDiff = 0.0;
|
||||
|
||||
std::unique_ptr<std::thread> _receiveThread = nullptr;
|
||||
std::shared_ptr<ghoul::Event<>> _connectionEvent;
|
||||
|
||||
@@ -135,12 +135,12 @@ private:
|
||||
UniformCache(downscaledRenderedVolume, downscaledRenderedVolumeDepth, viewport,
|
||||
resolution) _writeDownscaledVolumeUniformCache;
|
||||
|
||||
GLint _defaultFBO;
|
||||
GLuint _screenQuad;
|
||||
GLuint _vertexPositionBuffer;
|
||||
GLuint _exitColorTexture;
|
||||
GLuint _exitDepthTexture;
|
||||
GLuint _exitFramebuffer;
|
||||
GLint _defaultFBO = 0;
|
||||
GLuint _screenQuad = 0;
|
||||
GLuint _vertexPositionBuffer = 0;
|
||||
GLuint _exitColorTexture = 0;
|
||||
GLuint _exitDepthTexture = 0;
|
||||
GLuint _exitFramebuffer = 0;
|
||||
|
||||
struct {
|
||||
GLuint colorTexture;
|
||||
|
||||
@@ -72,20 +72,20 @@ struct Shaders {
|
||||
|
||||
struct VertexObjects {
|
||||
struct {
|
||||
GLuint vao;
|
||||
GLuint vbo;
|
||||
GLuint vao = 0;
|
||||
GLuint vbo = 0;
|
||||
} square;
|
||||
|
||||
struct {
|
||||
GLuint vao;
|
||||
GLuint vbo;
|
||||
GLuint ibo;
|
||||
GLuint vao = 0;
|
||||
GLuint vbo = 0;
|
||||
GLuint ibo = 0;
|
||||
|
||||
int nElements = 64;
|
||||
} sphere;
|
||||
|
||||
struct {
|
||||
GLuint vao;
|
||||
GLuint vao = 0;
|
||||
} empty;
|
||||
};
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
std::string documentation;
|
||||
std::string name;
|
||||
std::string guiPath;
|
||||
bool isLocal;
|
||||
bool isLocal = false;
|
||||
std::string script;
|
||||
};
|
||||
|
||||
@@ -101,7 +101,7 @@ public:
|
||||
Relative
|
||||
};
|
||||
|
||||
Type type;
|
||||
Type type = Type::Absolute;
|
||||
std::string value;
|
||||
};
|
||||
|
||||
@@ -111,7 +111,7 @@ public:
|
||||
std::string anchor;
|
||||
std::optional<std::string> aim;
|
||||
std::string referenceFrame;
|
||||
glm::dvec3 position;
|
||||
glm::dvec3 position = glm::dvec3(0.0);
|
||||
std::optional<glm::dvec3> up;
|
||||
std::optional<double> yaw;
|
||||
std::optional<double> pitch;
|
||||
@@ -121,8 +121,8 @@ public:
|
||||
static constexpr const char* Type = "goToGeo";
|
||||
|
||||
std::string anchor;
|
||||
double latitude;
|
||||
double longitude;
|
||||
double latitude = 0.0;
|
||||
double longitude = 0.0;
|
||||
std::optional<double> altitude;
|
||||
};
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ struct LuaLibrary {
|
||||
/// The name of the function
|
||||
std::string name;
|
||||
/// The function pointer that is executed if the function is called
|
||||
lua_CFunction function;
|
||||
lua_CFunction function = nullptr;
|
||||
struct Argument {
|
||||
/// The name of the arguments
|
||||
std::string name;
|
||||
|
||||
@@ -856,7 +856,7 @@ public:
|
||||
};
|
||||
|
||||
/// The shape of the returned field of view
|
||||
Shape shape;
|
||||
Shape shape = Shape::Rectangle;
|
||||
|
||||
/// The name of the reference frame in which the #bounds are defined
|
||||
std::string frameName;
|
||||
|
||||
@@ -198,7 +198,8 @@ constexpr double convertTime(double t, TimeUnit sourceUnit, TimeUnit destination
|
||||
case TimeUnit::Year:
|
||||
seconds = t * SecondsPerYear;
|
||||
break;
|
||||
default: ;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
switch (destinationUnit) {
|
||||
|
||||
@@ -167,7 +167,7 @@ private:
|
||||
bool _shouldSetTime = false;
|
||||
Time _timeNextFrame;
|
||||
|
||||
bool _timelineChanged;
|
||||
bool _timelineChanged = false;
|
||||
|
||||
double _latestConsumedTimestamp = -std::numeric_limits<double>::max();
|
||||
int _nextCallbackHandle = 0;
|
||||
|
||||
@@ -97,7 +97,7 @@ bool ScreenSpaceFramebuffer::deinitializeGL() {
|
||||
|
||||
_framebuffer->activate();
|
||||
_framebuffer->detachAll();
|
||||
_framebuffer->deactivate();
|
||||
ghoul::opengl::FramebufferObject::deactivate();
|
||||
removeAllRenderFunctions();
|
||||
|
||||
return true;
|
||||
@@ -122,7 +122,7 @@ void ScreenSpaceFramebuffer::render() {
|
||||
);
|
||||
global::renderEngine->openglStateCache().setViewportState(viewport);
|
||||
|
||||
GLint defaultFBO = _framebuffer->getActiveObject();
|
||||
GLint defaultFBO = ghoul::opengl::FramebufferObject::getActiveObject();
|
||||
_framebuffer->activate();
|
||||
|
||||
glClearColor(0.f, 0.f, 0.f, 0.f);
|
||||
@@ -130,7 +130,7 @@ void ScreenSpaceFramebuffer::render() {
|
||||
for (const RenderFunction& renderFunction : _renderFunctions) {
|
||||
renderFunction();
|
||||
}
|
||||
_framebuffer->deactivate();
|
||||
ghoul::opengl::FramebufferObject::deactivate();
|
||||
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, defaultFBO);
|
||||
glViewport(viewport[0], viewport[1], viewport[2], viewport[3]);
|
||||
@@ -185,7 +185,7 @@ void ScreenSpaceFramebuffer::createFramebuffer() {
|
||||
_texture->setFilter(ghoul::opengl::Texture::FilterMode::LinearMipMap);
|
||||
_texture->purgeFromRAM();
|
||||
_framebuffer->attachTexture(_texture.get(), GL_COLOR_ATTACHMENT0);
|
||||
_framebuffer->deactivate();
|
||||
ghoul::opengl::FramebufferObject::deactivate();
|
||||
}
|
||||
|
||||
int ScreenSpaceFramebuffer::id() {
|
||||
|
||||
@@ -170,7 +170,7 @@ void OpenSpaceEngine::registerPathTokens() {
|
||||
using Override = ghoul::filesystem::FileSystem::Override;
|
||||
FileSys.registerPathToken(
|
||||
std::move(fullKey),
|
||||
std::move(path.second),
|
||||
path.second,
|
||||
Override(overrideBase || overrideTemporary)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -101,9 +101,9 @@ glm::dmat3 TransformationManager::kameleonTransformationMatrix(
|
||||
ccmc::Position out1;
|
||||
ccmc::Position out2;
|
||||
|
||||
_kameleon->_cxform(from.c_str(), to.c_str(), ephemerisTime, &in0, &out0);
|
||||
_kameleon->_cxform(from.c_str(), to.c_str(), ephemerisTime, &in1, &out1);
|
||||
_kameleon->_cxform(from.c_str(), to.c_str(), ephemerisTime, &in2, &out2);
|
||||
ccmc::Kameleon::_cxform(from.c_str(), to.c_str(), ephemerisTime, &in0, &out0);
|
||||
ccmc::Kameleon::_cxform(from.c_str(), to.c_str(), ephemerisTime, &in1, &out1);
|
||||
ccmc::Kameleon::_cxform(from.c_str(), to.c_str(), ephemerisTime, &in2, &out2);
|
||||
|
||||
return glm::dmat3(
|
||||
out0.c0, out0.c1, out0.c2,
|
||||
|
||||
Submodule support/coding/codegen updated: b2c8623b81...8f2fa0a689
Reference in New Issue
Block a user