Skip to content

Commit

Permalink
fixing warnings and tests
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Chen <[email protected]>
  • Loading branch information
iche033 committed Jan 30, 2023
1 parent 2ec5d47 commit 33b0220
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
2 changes: 2 additions & 0 deletions ogre/include/gz/rendering/ogre/OgreVisual.hh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#ifndef GZ_RENDERING_OGRE_OGREVISUAL_HH_
#define GZ_RENDERING_OGRE_OGREVISUAL_HH_

#include <memory>

#include "gz/rendering/base/BaseVisual.hh"
#include "gz/rendering/ogre/OgreNode.hh"
#include "gz/rendering/ogre/OgreRenderTypes.hh"
Expand Down
3 changes: 3 additions & 0 deletions ogre/src/OgreDepthCamera.cc
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ void OgreDepthCamera::Destroy()
this->ogreCamera = nullptr;
}
}

// call base node destroy to remove parent
OgreNode::Destroy();
}

//////////////////////////////////////////////////
Expand Down
2 changes: 2 additions & 0 deletions ogre2/include/gz/rendering/ogre2/Ogre2Camera.hh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#ifndef GZ_RENDERING_OGRE2_OGRE2CAMERA_HH_
#define GZ_RENDERING_OGRE2_OGRE2CAMERA_HH_

#include <memory>

#include "gz/rendering/base/BaseCamera.hh"
#include "gz/rendering/ogre2/Ogre2RenderTypes.hh"
#include "gz/rendering/ogre2/Ogre2Includes.hh"
Expand Down
6 changes: 3 additions & 3 deletions src/Scene_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -532,9 +532,9 @@ void SceneTest::DestroyNodes(const std::string &_renderEngine)
EXPECT_EQ(0u, scene->SensorCount());
EXPECT_EQ(0u, scene->LightCount());

EXPECT_DOUBLE_EQ(0.0, scene->SimTime().Double());
scene->SetSimTime(common::Time(3.55));
EXPECT_DOUBLE_EQ(3.55, scene->SimTime().Double());
EXPECT_EQ(std::chrono::milliseconds(0), scene->Time());
scene->SetTime(std::chrono::milliseconds(3550));
EXPECT_EQ(std::chrono::milliseconds(3550), scene->Time());

// Clean up
engine->DestroyScene(scene);
Expand Down

0 comments on commit 33b0220

Please sign in to comment.