mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-18 01:56:26 -05:00
Add a cast from json to std::string for the anchor in the Horizonsdialog(#3548)
This fixes compilation with GCC 14.2.1
This commit is contained in:
@@ -858,7 +858,7 @@ openspace::HorizonsFile HorizonsDialog::handleAnswer(nlohmann::json& answer) {
|
||||
|
||||
auto it = answer.find("error");
|
||||
if (it != answer.end()) {
|
||||
_latestHorizonsError = *it;
|
||||
_latestHorizonsError = it->get<std::string>();
|
||||
}
|
||||
|
||||
HorizonsResultCode isValid = isValidHorizonsAnswer(answer);
|
||||
|
||||
@@ -114,7 +114,7 @@ NavigationState::NavigationState(const nlohmann::json& json) {
|
||||
position.y = json["position"]["y"].get<double>();
|
||||
position.z = json["position"]["z"].get<double>();
|
||||
|
||||
anchor = json["anchor"];
|
||||
anchor = json["anchor"].get<std::string>();
|
||||
|
||||
if (auto it = json.find("referenceframe"); it != json.end()) {
|
||||
referenceFrame = it->get<std::string>();
|
||||
|
||||
Reference in New Issue
Block a user