Remove more warnings on Jenkins

This commit is contained in:
Alexander Bock
2018-07-05 14:40:54 -04:00
parent e8735d4544
commit 8dce177d33
24 changed files with 98 additions and 132 deletions

View File

@@ -90,30 +90,30 @@ void ModuleEngine::deinitializeGL() {
LDEBUG("Finished deinitializing OpenGL of modules");
}
void ModuleEngine::registerModule(std::unique_ptr<OpenSpaceModule> module,
void ModuleEngine::registerModule(std::unique_ptr<OpenSpaceModule> mod,
const ghoul::Dictionary& configuration)
{
ghoul_assert(module, "Module must not be nullptr");
ghoul_assert(mod, "Module must not be nullptr");
auto it = std::find_if(
_modules.begin(),
_modules.end(),
[&module](std::unique_ptr<OpenSpaceModule>& rhs) {
return rhs->identifier() == module->identifier();
[&mod](std::unique_ptr<OpenSpaceModule>& rhs) {
return rhs->identifier() == mod->identifier();
}
);
if (it != _modules.end()) {
throw ghoul::RuntimeError(
"Module name '" + module->identifier() + "' was registered before",
"Module name '" + mod->identifier() + "' was registered before",
"ModuleEngine"
);
}
LDEBUG(fmt::format("Registering module '{}'", module->identifier()));
module->initialize(this, configuration);
addPropertySubOwner(module.get());
LDEBUG(fmt::format("Registered module '{}'", module->identifier()));
_modules.push_back(std::move(module));
LDEBUG(fmt::format("Registering module '{}'", mod->identifier()));
mod->initialize(this, configuration);
addPropertySubOwner(mod.get());
LDEBUG(fmt::format("Registered module '{}'", mod->identifier()));
_modules.push_back(std::move(mod));
}
std::vector<OpenSpaceModule*> ModuleEngine::modules() const {

View File

@@ -156,8 +156,8 @@ OrbitalNavigator::OrbitalNavigator()
, _mouseStates(_mouseSensitivity * 0.0001, 1 / (_friction.friction + 0.0000001))
, _joystickStates(_joystickSensitivity * 0.1, 1 / (_friction.friction + 0.0000001))
, _useAdaptiveStereoscopicDepth(UseAdaptiveStereoscopicDepthInfo, true)
, _staticViewScaleExponent(StaticViewScaleExponentInfo, 0.f, -30, 10)
, _stereoscopicDepthOfFocusSurface(StereoscopicDepthOfFocusSurfaceInfo, 8, 0.25, 100)
, _staticViewScaleExponent(StaticViewScaleExponentInfo, 0.f, -30, 10)
, _rotateToFocusInterpolationTime(RotateToFocusInterpolationTimeInfo, 2.0, 0.0, 10.0)
, _stereoInterpolationTime(StereoInterpolationTimeInfo, 8.0, 0.0, 10.0)
{
@@ -512,22 +512,6 @@ glm::dquat OrbitalNavigator::interpolateLocalRotation(double deltaTime,
else {
return localCameraRotation;
}
double t = _rotateToFocusNodeInterpolator.value();
_rotateToFocusNodeInterpolator.setDeltaTime(static_cast<float>(deltaTime));
_rotateToFocusNodeInterpolator.step();
glm::dquat result = glm::slerp(
localCameraRotation,
glm::dquat(glm::dvec3(0.0)),
glm::min(t * _rotateToFocusNodeInterpolator.deltaTimeScaled(), 1.0)
);
if (angle(result) < 0.01) {
_rotateToFocusNodeInterpolator.end();
}
return result;
}
double OrbitalNavigator::interpolateCameraToSurfaceDistance(double deltaTime,

View File

@@ -48,8 +48,7 @@ glm::dmat4x2 fromLuaConversion(lua_State* state, bool& success) {
return glm::dmat4x2(0);
}
else {
result[i][j]
= static_cast<glm::dmat4x2::value_type>(lua_tonumber(state, -1));
result[i][j] = lua_tonumber(state, -1);
lua_pop(state, 1);
++number;
}

View File

@@ -359,8 +359,8 @@ void FramebufferRenderer::updateResolution() {
GL_TEXTURE_2D_MULTISAMPLE,
_nAaSamples,
GL_RGBA,
GLsizei(_resolution.x),
GLsizei(_resolution.y),
_resolution.x,
_resolution.y,
true
);
@@ -371,8 +371,8 @@ void FramebufferRenderer::updateResolution() {
GL_TEXTURE_2D,
0,
GL_RGBA32F,
GLsizei(_resolution.x),
GLsizei(_resolution.y),
_resolution.x,
_resolution.y,
0,
GL_RGBA,
GL_FLOAT,
@@ -388,8 +388,8 @@ void FramebufferRenderer::updateResolution() {
GL_TEXTURE_2D_MULTISAMPLE,
_nAaSamples,
GL_RGBA32F,
GLsizei(_resolution.x),
GLsizei(_resolution.y),
_resolution.x,
_resolution.y,
true
);
@@ -399,8 +399,8 @@ void FramebufferRenderer::updateResolution() {
GL_TEXTURE_2D_MULTISAMPLE,
_nAaSamples,
GL_RGBA32F,
GLsizei(_resolution.x),
GLsizei(_resolution.y),
_resolution.x,
_resolution.y,
true
);
@@ -409,8 +409,8 @@ void FramebufferRenderer::updateResolution() {
GL_TEXTURE_2D_MULTISAMPLE,
_nAaSamples,
GL_DEPTH_COMPONENT32F,
GLsizei(_resolution.x),
GLsizei(_resolution.y),
_resolution.x,
_resolution.y,
true
);
@@ -419,8 +419,8 @@ void FramebufferRenderer::updateResolution() {
GL_TEXTURE_2D,
0,
GL_RGBA16,
GLsizei(_resolution.x),
GLsizei(_resolution.y),
_resolution.x,
_resolution.y,
0,
GL_RGBA,
GL_UNSIGNED_SHORT,
@@ -436,8 +436,8 @@ void FramebufferRenderer::updateResolution() {
GL_TEXTURE_2D,
0,
GL_DEPTH_COMPONENT32F,
GLsizei(_resolution.x),
GLsizei(_resolution.y),
_resolution.x,
_resolution.y,
0,
GL_DEPTH_COMPONENT,
GL_FLOAT,

View File

@@ -482,18 +482,18 @@ int removeSceneGraphNode(lua_State* L) {
}
std::function<void (SceneGraphNode*, SceneGraphNode*)> removeNode =
[&removeNode](SceneGraphNode* parent, SceneGraphNode* node) {
std::vector<SceneGraphNode*> children = node->children();
[&removeNode](SceneGraphNode* p, SceneGraphNode* localNode) {
std::vector<SceneGraphNode*> children = localNode->children();
std::unique_ptr<SceneGraphNode> n = parent->detachChild(*node);
ghoul_assert(n.get() == node, "Wrong node returned from detaching");
std::unique_ptr<SceneGraphNode> n = p->detachChild(*localNode);
ghoul_assert(n.get() == localNode, "Wrong node returned from detaching");
for (SceneGraphNode* c : children) {
removeNode(n.get(), c);
}
node->deinitializeGL();
node->deinitialize();
localNode->deinitializeGL();
localNode->deinitialize();
n = nullptr;
};

View File

@@ -78,12 +78,12 @@ FactoryManager& FactoryManager::ref() {
return *_manager;
}
void FactoryManager::addFactory(std::unique_ptr<ghoul::TemplateFactoryBase> factory,
std::string name
) {
ghoul_assert(factory, "Factory must not be nullptr");
void FactoryManager::addFactory(std::unique_ptr<ghoul::TemplateFactoryBase> f,
std::string name)
{
ghoul_assert(f, "Factory must not be nullptr");
_factories.push_back({ std::move(factory), std::move(name) });
_factories.push_back({ std::move(f), std::move(name) });
}
std::string FactoryManager::generateJson() const {

View File

@@ -272,8 +272,7 @@ int time_advancedTime(lua_State* L) {
lua_pop(L, 2);
if (usesISO) {
Time t(j2000Seconds + dt);
ghoul::lua::push(L, t.ISO8601());
ghoul::lua::push(L, Time(j2000Seconds + dt).ISO8601());
}
else {
ghoul::lua::push(L, j2000Seconds + dt);