mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-05 19:19:39 -06:00
Introduction of new Dictionary class (#1446)
* Adapting to introduction of new Dictionary class in Ghoul * Mainly replacing usage of float instead of doubles as expected * Adjust to the lack of the hasKeyAndValue function
This commit is contained in:
@@ -314,7 +314,7 @@ RenderableFov::RenderableFov(const ghoul::Dictionary& dictionary)
|
||||
);
|
||||
|
||||
std::string ia = std::string(KeyInstrument) + "." + KeyInstrumentAberration;
|
||||
if (dictionary.hasKeyAndValue<std::string>(ia)) {
|
||||
if (dictionary.hasValue<std::string>(ia)) {
|
||||
const std::string& ac = dictionary.value<std::string>(ia);
|
||||
_instrument.aberrationCorrection = SpiceManager::AberrationCorrection(ac);
|
||||
}
|
||||
@@ -328,9 +328,9 @@ RenderableFov::RenderableFov(const ghoul::Dictionary& dictionary)
|
||||
|
||||
if (dictionary.hasKey(KeyFrameConversions)) {
|
||||
ghoul::Dictionary fc = dictionary.value<ghoul::Dictionary>(KeyFrameConversions);
|
||||
for (const std::string& key : fc.keys()) {
|
||||
for (std::string_view key : fc.keys()) {
|
||||
global::moduleEngine->module<SpacecraftInstrumentsModule>()->addFrame(
|
||||
key,
|
||||
std::string(key),
|
||||
fc.value<std::string>(key)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user