Address Visual Studio analyzer warnings

This commit is contained in:
Alexander Bock
2022-04-12 00:58:11 +02:00
parent f1667a7f43
commit d360f2ae59
17 changed files with 38 additions and 41 deletions
+3 -3
View File
@@ -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
+1 -1
View File
@@ -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;
+6 -6
View File
@@ -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;
};
+5 -5
View File
@@ -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;
};
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;
+2 -1
View File
@@ -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) {
+1 -1
View File
@@ -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;