mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-18 02:49:03 -06:00
Update submodules
Remove warnings and MSVC analyzer information messages
This commit is contained in:
Submodule apps/OpenSpace/ext/sgct updated: 76062e74a1...3d3835c38c
Submodule ext/ghoul updated: 77ce270021...d18c7bb1fb
@@ -40,18 +40,18 @@ enum class Type : uint32_t {
|
||||
};
|
||||
|
||||
struct CameraKeyframe {
|
||||
CameraKeyframe() {}
|
||||
CameraKeyframe(const std::vector<char> &buffer) {
|
||||
CameraKeyframe() = default;
|
||||
CameraKeyframe(const std::vector<char>& buffer) {
|
||||
deserialize(buffer);
|
||||
}
|
||||
|
||||
glm::dvec3 _position = glm::dvec3(0.0);
|
||||
glm::dquat _rotation = glm::dquat(1.0, 0.0, 0.0, 0.0);
|
||||
bool _followNodeRotation;
|
||||
bool _followNodeRotation = false;
|
||||
std::string _focusNode;
|
||||
float _scale;
|
||||
float _scale = 0.f;
|
||||
|
||||
double _timestamp;
|
||||
double _timestamp = 0.0;
|
||||
|
||||
void serialize(std::vector<char> &buffer) const {
|
||||
// Add position
|
||||
@@ -104,28 +104,28 @@ struct CameraKeyframe {
|
||||
);
|
||||
};
|
||||
|
||||
size_t deserialize(const std::vector<char> &buffer, size_t offset = 0) {
|
||||
size_t deserialize(const std::vector<char>& buffer, size_t offset = 0) {
|
||||
int size = 0;
|
||||
|
||||
// Position
|
||||
size = sizeof(_position);
|
||||
memcpy(&_position, buffer.data() + offset, size);
|
||||
std::memcpy(&_position, buffer.data() + offset, size);
|
||||
offset += size;
|
||||
|
||||
// Orientation
|
||||
size = sizeof(_rotation);
|
||||
memcpy(&_rotation, buffer.data() + offset, size);
|
||||
std::memcpy(&_rotation, buffer.data() + offset, size);
|
||||
offset += size;
|
||||
|
||||
// Follow focus node rotation?
|
||||
size = sizeof(_followNodeRotation);
|
||||
memcpy(&_followNodeRotation, buffer.data() + offset, size);
|
||||
std::memcpy(&_followNodeRotation, buffer.data() + offset, size);
|
||||
offset += size;
|
||||
|
||||
// Focus node
|
||||
int nodeNameLength;
|
||||
size = sizeof(int);
|
||||
memcpy(&nodeNameLength, buffer.data() + offset, size);
|
||||
std::memcpy(&nodeNameLength, buffer.data() + offset, size);
|
||||
offset += size;
|
||||
size = nodeNameLength;
|
||||
_focusNode = std::string(buffer.data() + offset, buffer.data() + offset + size);
|
||||
@@ -133,29 +133,20 @@ struct CameraKeyframe {
|
||||
|
||||
// Scale
|
||||
size = sizeof(_scale);
|
||||
memcpy(&_scale, buffer.data() + offset, size);
|
||||
std::memcpy(&_scale, buffer.data() + offset, size);
|
||||
offset += size;
|
||||
|
||||
// Timestamp
|
||||
size = sizeof(_timestamp);
|
||||
memcpy(&_timestamp, buffer.data() + offset, size);
|
||||
std::memcpy(&_timestamp, buffer.data() + offset, size);
|
||||
offset += size;
|
||||
|
||||
return offset;
|
||||
};
|
||||
|
||||
void write(std::ostream& out) const {
|
||||
// Write position
|
||||
out.write(
|
||||
reinterpret_cast<const char*>(&_position),
|
||||
sizeof(_position)
|
||||
);
|
||||
|
||||
// Write orientation
|
||||
out.write(
|
||||
reinterpret_cast<const char*>(&_rotation),
|
||||
sizeof(_rotation)
|
||||
);
|
||||
out.write(reinterpret_cast<const char*>(&_position), sizeof(_position));
|
||||
out.write(reinterpret_cast<const char*>(&_rotation), sizeof(_rotation));
|
||||
|
||||
// Write follow focus node rotation?
|
||||
out.write(
|
||||
@@ -166,88 +157,58 @@ struct CameraKeyframe {
|
||||
int nodeNameLength = static_cast<int>(_focusNode.size());
|
||||
|
||||
// Write focus node
|
||||
out.write(
|
||||
reinterpret_cast<const char*>(&nodeNameLength),
|
||||
sizeof(nodeNameLength)
|
||||
);
|
||||
out.write(
|
||||
_focusNode.c_str(),
|
||||
_focusNode.size()
|
||||
);
|
||||
out.write(reinterpret_cast<const char*>(&nodeNameLength), sizeof(nodeNameLength));
|
||||
out.write(_focusNode.c_str(), _focusNode.size());
|
||||
|
||||
//Write scale
|
||||
out.write(
|
||||
reinterpret_cast<const char*>(&_scale),
|
||||
sizeof(_scale)
|
||||
);
|
||||
// Write scale
|
||||
out.write(reinterpret_cast<const char*>(&_scale), sizeof(_scale));
|
||||
|
||||
// Write timestamp
|
||||
out.write(
|
||||
reinterpret_cast<const char*>(&_timestamp),
|
||||
sizeof(_timestamp)
|
||||
);
|
||||
out.write(reinterpret_cast<const char*>(&_timestamp), sizeof(_timestamp));
|
||||
};
|
||||
|
||||
void read(std::istream* in) {
|
||||
// Read position
|
||||
in->read(
|
||||
reinterpret_cast<char*>(&_position),
|
||||
sizeof(_position)
|
||||
);
|
||||
in->read(reinterpret_cast<char*>(&_position), sizeof(_position));
|
||||
|
||||
// Read orientation
|
||||
in->read(
|
||||
reinterpret_cast<char*>(&_rotation),
|
||||
sizeof(_rotation)
|
||||
);
|
||||
in->read(reinterpret_cast<char*>(&_rotation), sizeof(_rotation));
|
||||
|
||||
// Read follow focus node rotation
|
||||
unsigned char b;
|
||||
in->read(
|
||||
reinterpret_cast<char*>(&b),
|
||||
sizeof(unsigned char)
|
||||
);
|
||||
in->read(reinterpret_cast<char*>(&b), sizeof(unsigned char));
|
||||
_followNodeRotation = (b == 1);
|
||||
|
||||
// Read focus node
|
||||
int nodeNameLength = static_cast<int>(_focusNode.size());
|
||||
in->read(
|
||||
reinterpret_cast<char*>(&nodeNameLength),
|
||||
sizeof(nodeNameLength)
|
||||
);
|
||||
std::vector<char> temp(nodeNameLength + 1);
|
||||
in->read(reinterpret_cast<char*>(&nodeNameLength), sizeof(nodeNameLength));
|
||||
std::vector<char> temp(static_cast<size_t>(nodeNameLength) + 1);
|
||||
in->read(temp.data(), nodeNameLength);
|
||||
|
||||
temp[nodeNameLength] = '\0';
|
||||
_focusNode = temp.data();
|
||||
|
||||
// Read scale
|
||||
in->read(
|
||||
reinterpret_cast<char*>(&_scale),
|
||||
sizeof(_scale)
|
||||
);
|
||||
in->read(reinterpret_cast<char*>(&_scale), sizeof(_scale));
|
||||
|
||||
// Read timestamp
|
||||
in->read(
|
||||
reinterpret_cast<char*>(&_timestamp),
|
||||
sizeof(_timestamp)
|
||||
);
|
||||
in->read(reinterpret_cast<char*>(&_timestamp), sizeof(_timestamp));
|
||||
};
|
||||
};
|
||||
|
||||
struct TimeKeyframe {
|
||||
TimeKeyframe() {}
|
||||
TimeKeyframe(const std::vector<char> &buffer) {
|
||||
TimeKeyframe() = default;
|
||||
TimeKeyframe(const std::vector<char>& buffer) {
|
||||
deserialize(buffer);
|
||||
}
|
||||
|
||||
double _time;
|
||||
double _dt;
|
||||
bool _paused;
|
||||
bool _requiresTimeJump;
|
||||
double _timestamp;
|
||||
double _time = 0.0;
|
||||
double _dt = 0.0;
|
||||
bool _paused = false;
|
||||
bool _requiresTimeJump = false;
|
||||
double _timestamp = 0.0;
|
||||
|
||||
void serialize(std::vector<char> &buffer) const {
|
||||
void serialize(std::vector<char>& buffer) const {
|
||||
buffer.insert(
|
||||
buffer.end(),
|
||||
reinterpret_cast<const char*>(this),
|
||||
@@ -255,37 +216,31 @@ struct TimeKeyframe {
|
||||
);
|
||||
};
|
||||
|
||||
size_t deserialize(const std::vector<char> &buffer, size_t offset = 0){
|
||||
size_t deserialize(const std::vector<char>& buffer, size_t offset = 0) {
|
||||
*this = *reinterpret_cast<const TimeKeyframe*>(buffer.data() + offset);
|
||||
offset += sizeof(TimeKeyframe);
|
||||
return offset;
|
||||
};
|
||||
|
||||
void write(std::ostream* out) const {
|
||||
out->write(
|
||||
reinterpret_cast<const char*>(this),
|
||||
sizeof(TimeKeyframe)
|
||||
);
|
||||
out->write(reinterpret_cast<const char*>(this), sizeof(TimeKeyframe));
|
||||
};
|
||||
|
||||
void read(std::istream* in) {
|
||||
in->read(
|
||||
reinterpret_cast<char*>(this),
|
||||
sizeof(TimeKeyframe)
|
||||
);
|
||||
in->read(reinterpret_cast<char*>(this), sizeof(TimeKeyframe));
|
||||
};
|
||||
};
|
||||
|
||||
struct TimeTimeline {
|
||||
TimeTimeline() {}
|
||||
TimeTimeline(const std::vector<char> &buffer) {
|
||||
TimeTimeline() = default;
|
||||
TimeTimeline(const std::vector<char>& buffer) {
|
||||
deserialize(buffer);
|
||||
}
|
||||
|
||||
bool _clear = true;
|
||||
std::vector<TimeKeyframe> _keyframes;
|
||||
|
||||
void serialize(std::vector<char> &buffer) const {
|
||||
void serialize(std::vector<char>& buffer) const {
|
||||
buffer.insert(
|
||||
buffer.end(),
|
||||
reinterpret_cast<const char*>(&_clear),
|
||||
@@ -298,77 +253,65 @@ struct TimeTimeline {
|
||||
reinterpret_cast<const char*>(&nKeyframes),
|
||||
reinterpret_cast<const char*>(&nKeyframes) + sizeof(int64_t)
|
||||
);
|
||||
for (const auto& k : _keyframes) {
|
||||
for (const TimeKeyframe& k : _keyframes) {
|
||||
k.serialize(buffer);
|
||||
}
|
||||
};
|
||||
|
||||
size_t deserialize(const std::vector<char> &buffer, size_t offset = 0) {
|
||||
size_t deserialize(const std::vector<char>& buffer, size_t offset = 0) {
|
||||
int size = 0;
|
||||
|
||||
size = sizeof(_clear);
|
||||
memcpy(&_clear, buffer.data() + offset, size);
|
||||
std::memcpy(&_clear, buffer.data() + offset, size);
|
||||
offset += size;
|
||||
|
||||
int64_t nKeyframes = _keyframes.size();
|
||||
size = sizeof(nKeyframes);
|
||||
memcpy(&nKeyframes, buffer.data() + offset, size);
|
||||
std::memcpy(&nKeyframes, buffer.data() + offset, size);
|
||||
offset += size;
|
||||
|
||||
_keyframes.resize(nKeyframes);
|
||||
for (auto& k : _keyframes) {
|
||||
for (TimeKeyframe& k : _keyframes) {
|
||||
offset = k.deserialize(buffer, offset);
|
||||
}
|
||||
return offset;
|
||||
};
|
||||
|
||||
void write(std::ostream* out) const {
|
||||
out->write(
|
||||
reinterpret_cast<const char*>(&_clear),
|
||||
sizeof(bool)
|
||||
);
|
||||
out->write(reinterpret_cast<const char*>(&_clear), sizeof(bool));
|
||||
|
||||
int64_t nKeyframes = _keyframes.size();
|
||||
out->write(
|
||||
reinterpret_cast<const char*>(&nKeyframes),
|
||||
sizeof(int64_t)
|
||||
);
|
||||
for (const auto& k : _keyframes) {
|
||||
out->write(reinterpret_cast<const char*>(&nKeyframes), sizeof(int64_t));
|
||||
for (const TimeKeyframe& k : _keyframes) {
|
||||
k.write(out);
|
||||
}
|
||||
};
|
||||
|
||||
void read(std::istream* in) {
|
||||
in->read(
|
||||
reinterpret_cast<char*>(&_clear),
|
||||
sizeof(bool)
|
||||
);
|
||||
in->read(reinterpret_cast<char*>(&_clear), sizeof(bool));
|
||||
|
||||
int64_t nKeyframes = _keyframes.size();
|
||||
in->read(
|
||||
reinterpret_cast<char*>(&nKeyframes),
|
||||
sizeof(int64_t)
|
||||
);
|
||||
for (auto& k : _keyframes) {
|
||||
in->read(reinterpret_cast<char*>(&nKeyframes), sizeof(int64_t));
|
||||
for (TimeKeyframe& k : _keyframes) {
|
||||
k.read(in);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
struct ScriptMessage {
|
||||
ScriptMessage() {}
|
||||
ScriptMessage(const std::vector<char> &buffer) {
|
||||
ScriptMessage() = default;
|
||||
ScriptMessage(const std::vector<char>& buffer) {
|
||||
deserialize(buffer);
|
||||
}
|
||||
|
||||
std::string _script;
|
||||
double _timestamp;
|
||||
double _timestamp = 0.0;
|
||||
|
||||
void serialize(std::vector<char> &buffer) const {
|
||||
void serialize(std::vector<char>& buffer) const {
|
||||
buffer.insert(buffer.end(), _script.begin(), _script.end());
|
||||
};
|
||||
|
||||
void deserialize(const std::vector<char> &buffer) {
|
||||
void deserialize(const std::vector<char>& buffer) {
|
||||
_script.assign(buffer.begin(), buffer.end());
|
||||
};
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ void Connection::handleMessage(const std::string& message) {
|
||||
message.end(),
|
||||
sanitizedString.begin(),
|
||||
[](wchar_t c) {
|
||||
return std::isprint(c, std::locale("")) ? c : ' ';
|
||||
return std::isprint(c, std::locale("")) ? char(c) : ' ';
|
||||
}
|
||||
);
|
||||
LERROR(fmt::format("Could not parse JSON: '{}'", sanitizedString));
|
||||
|
||||
@@ -303,12 +303,10 @@ void FlightControllerTopic::changeFocus(const nlohmann::json& json) const {
|
||||
fmt::format("Could not find {} key in JSON. JSON was:\n{}", FocusKey, j)
|
||||
);
|
||||
if (json.find(AimKey) == json.end()) {
|
||||
const std::string j = json;
|
||||
LWARNING(
|
||||
fmt::format("Could not find {} key in JSON. JSON was:\n{}", AimKey, j)
|
||||
);
|
||||
if (json.find(AnchorKey) == json.end()) {
|
||||
const std::string j = json;
|
||||
LWARNING(fmt::format(
|
||||
"Could not find {} key in JSON. JSON was:\n{}", AnchorKey, j
|
||||
));
|
||||
|
||||
@@ -332,7 +332,6 @@ glm::vec2 DashboardItemInstruments::size() const {
|
||||
|
||||
if (remaining > 0) {
|
||||
using FR = ghoul::fontrendering::FontRenderer;
|
||||
FR& renderer = FR::defaultRenderer();
|
||||
std::string progress = progressToStr(25, t);
|
||||
|
||||
size = addToBoundingbox(
|
||||
|
||||
@@ -25,7 +25,16 @@
|
||||
#ifndef __OPENSPACE_MODULE_WEBBROWSER___CEF_HOST___H__
|
||||
#define __OPENSPACE_MODULE_WEBBROWSER___CEF_HOST___H__
|
||||
|
||||
#ifdef WIN32
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4100)
|
||||
#endif // WIN32
|
||||
|
||||
#include <include/wrapper/cef_helpers.h>
|
||||
|
||||
#ifdef WIN32
|
||||
#pragma warning(pop)
|
||||
#endif // WIN32
|
||||
#include <string>
|
||||
|
||||
struct CefSettingsTraits;
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#include <ghoul/logging/logmanager.h>
|
||||
#include <ghoul/misc/profiling.h>
|
||||
#include <fmt/format.h>
|
||||
#include <include/wrapper/cef_helpers.h>
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <include/wrapper/cef_library_loader.h>
|
||||
|
||||
Reference in New Issue
Block a user