mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-22 11:18:22 -05:00
Code cleanup branch (#618)
* Make height map fallback layer work again * Add documentation to joystick button bindings * Removed grouped property headers * Add new version number constant generated by CMake * Make Joystick deadzone work properly * Change the startup date on Earth to today * Fix key modifier handling * Add debugging indices for TreeNodeDebugging * Fix script schedule for OsirisRex * Do not open Mission schedule automatically * Upload default projection texture automatically * General code cleanup * Fix check_style_guide warnings * Remove .clang-format * MacOS compile fixes * Clang analyzer fixes
This commit is contained in:
@@ -25,27 +25,19 @@
|
||||
#include <modules/spacecraftinstruments/util/decoder.h>
|
||||
|
||||
#include <openspace/util/factorymanager.h>
|
||||
|
||||
#include <ghoul/misc/dictionary.h>
|
||||
#include <ghoul/misc/exception.h>
|
||||
#include <ghoul/misc/templatefactory.h>
|
||||
|
||||
namespace openspace {
|
||||
|
||||
std::unique_ptr<Decoder> Decoder::createFromDictionary(
|
||||
const ghoul::Dictionary& dictionary, const std::string& type)
|
||||
const ghoul::Dictionary& dictionary,
|
||||
const std::string& type)
|
||||
{
|
||||
ghoul::TemplateFactory<Decoder>* factory = FactoryManager::ref().factory<Decoder>();
|
||||
std::unique_ptr<Decoder> result = factory->create(type, dictionary);
|
||||
|
||||
if (!result) {
|
||||
throw ghoul::RuntimeError(
|
||||
"Failed creating payload object of type '" + type + '"',
|
||||
"Decoder"
|
||||
);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Decoder::~Decoder() {}
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
Reference in New Issue
Block a user