Minor various fixes

This commit is contained in:
Alexander Bock
2017-04-12 14:21:02 -04:00
parent 5e7302822b
commit bef337c0eb
7 changed files with 26 additions and 41 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ namespace openspace {
std::string licenseText() {
return "OpenSpace\n\
\n\
Copyright (c) 2014-2016\n\
Copyright (c) 2014-2017\n\
\n\
Permission is hereby granted, free of charge, to any person obtaining a copy of this\n\
software and associated documentation files (the \"Software\"), to deal in the Software\n\
+2 -10
View File
@@ -28,13 +28,12 @@
#include <openspace/documentation/verifier.h>
#include <openspace/util/factorymanager.h>
#include <ghoul/misc/dictionary.h>
#include <ghoul/logging/logmanager.h>
#include <ghoul/misc/dictionary.h>
namespace {
const char* _loggerCat = "Rotation";
const char* KeyType = "Type";
}
} // namespace
namespace openspace {
@@ -64,11 +63,6 @@ std::unique_ptr<Rotation> Rotation::createFromDictionary(const ghoul::Dictionary
std::string rotationType = dictionary.value<std::string>(KeyType);
auto factory = FactoryManager::ref().factory<Rotation>();
std::unique_ptr<Rotation> result = factory->create(rotationType, dictionary);
if (result == nullptr) {
LERROR("Failed creating Rotation object of type '" << rotationType << "'");
return nullptr;
}
return result;
}
@@ -80,8 +74,6 @@ Rotation::Rotation(const ghoul::Dictionary& dictionary)
: properties::PropertyOwner("Rotation")
{}
Rotation::~Rotation() {}
bool Rotation::initialize() {
return true;
}
+2 -9
View File
@@ -27,14 +27,14 @@
#include <openspace/documentation/documentation.h>
#include <openspace/documentation/verifier.h>
#include <openspace/util/factorymanager.h>
#include <openspace/util/updatestructures.h>
#include <ghoul/logging/logmanager.h>
#include <ghoul/misc/dictionary.h>
namespace {
const char* _loggerCat = "Scale";
const char* KeyType = "Type";
}
} // namespace
namespace openspace {
@@ -68,11 +68,6 @@ std::unique_ptr<Scale> Scale::createFromDictionary(const ghoul::Dictionary& dict
auto factory = FactoryManager::ref().factory<Scale>();
std::unique_ptr<Scale> result = factory->create(scaleType, dictionary);
result->setName("Scale");
if (result == nullptr) {
LERROR("Failed creating Scale object of type '" << scaleType << "'");
return nullptr;
}
return result;
}
@@ -80,8 +75,6 @@ Scale::Scale()
: properties::PropertyOwner("Scale")
{}
Scale::~Scale() {}
bool Scale::initialize() {
return true;
}
+5 -15
View File
@@ -24,16 +24,16 @@
#include <openspace/scene/translation.h>
#include <openspace/documentation/verifier.h>
#include <openspace/util/factorymanager.h>
#include <openspace/util/updatestructures.h>
#include <ghoul/logging/logmanager.h>
#include <ghoul/misc/dictionary.h>
#include <openspace/documentation/verifier.h>
namespace {
const char* _loggerCat = "Translation";
const char* KeyType = "Type";
}
} // namespace
namespace openspace {
@@ -61,10 +61,7 @@ documentation::Documentation Translation::Documentation() {
std::unique_ptr<Translation> Translation::createFromDictionary(
const ghoul::Dictionary& dictionary)
{
if (!dictionary.hasValue<std::string>(KeyType)) {
LERROR("Translation did not have key '" << KeyType << "'");
return nullptr;
}
documentation::testSpecificationAndThrow(Documentation(), dictionary, "Translation");
std::string translationType;
dictionary.getValue(KeyType, translationType);
@@ -72,11 +69,6 @@ std::unique_ptr<Translation> Translation::createFromDictionary(
= FactoryManager::ref().factory<Translation>();
std::unique_ptr<Translation> result = factory->create(translationType, dictionary);
result->setName("Translation");
if (result == nullptr) {
LERROR("Failed creating Translation object of type '" << translationType << "'");
return nullptr;
}
return result;
}
@@ -84,8 +76,6 @@ Translation::Translation()
: properties::PropertyOwner("Translation")
{}
Translation::~Translation() {}
bool Translation::initialize() {
return true;
}