Feature/warnings (#1425)

* Remove MSVC, GCC, Clang compiler warnings
* Remove cppcheck warnings
This commit is contained in:
Alexander Bock
2020-12-07 23:43:05 +01:00
committed by GitHub
parent 51470c0a0d
commit 86bb19d81c
94 changed files with 392 additions and 511 deletions

View File

@@ -114,12 +114,12 @@ struct CameraKeyframe {
// Position
size = sizeof(_position);
std::memcpy(&_position, buffer.data() + offset, size);
std::memcpy(glm::value_ptr(_position), buffer.data() + offset, size);
offset += size;
// Orientation
size = sizeof(_rotation);
std::memcpy(&_rotation, buffer.data() + offset, size);
std::memcpy(glm::value_ptr(_rotation), buffer.data() + offset, size);
offset += size;
// Follow focus node rotation?
@@ -150,8 +150,14 @@ struct CameraKeyframe {
};
void write(std::ostream& out) const {
out.write(reinterpret_cast<const char*>(&_position), sizeof(_position));
out.write(reinterpret_cast<const char*>(&_rotation), sizeof(_rotation));
out.write(
reinterpret_cast<const char*>(glm::value_ptr(_position)),
sizeof(_position)
);
out.write(
reinterpret_cast<const char*>(glm::value_ptr(_rotation)),
sizeof(_rotation)
);
// Write follow focus node rotation?
out.write(