1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-03-01 15:09:43 +00:00

Merge branch 'default' into 'master'

Use `default` instead of empty constructors/destructors

See merge request OpenMW/openmw!957
This commit is contained in:
Evil Eye 2021-06-24 17:19:02 +00:00
commit 7e9785941c
16 changed files with 13 additions and 41 deletions

View file

@ -16,8 +16,6 @@
namespace MWDialogue namespace MWDialogue
{ {
Entry::Entry() {}
Entry::Entry (const std::string& topic, const std::string& infoId, const MWWorld::Ptr& actor) Entry::Entry (const std::string& topic, const std::string& infoId, const MWWorld::Ptr& actor)
: mInfoId (infoId) : mInfoId (infoId)
{ {
@ -60,8 +58,6 @@ namespace MWDialogue
} }
JournalEntry::JournalEntry() {}
JournalEntry::JournalEntry (const std::string& topic, const std::string& infoId, const MWWorld::Ptr& actor) JournalEntry::JournalEntry (const std::string& topic, const std::string& infoId, const MWWorld::Ptr& actor)
: Entry (topic, infoId, actor), mTopic (topic) : Entry (topic, infoId, actor), mTopic (topic)
{} {}

View file

@ -22,7 +22,7 @@ namespace MWDialogue
std::string mText; std::string mText;
std::string mActorName; // optional std::string mActorName; // optional
Entry(); Entry() = default;
/// actor is optional /// actor is optional
Entry (const std::string& topic, const std::string& infoId, const MWWorld::Ptr& actor); Entry (const std::string& topic, const std::string& infoId, const MWWorld::Ptr& actor);
@ -41,7 +41,7 @@ namespace MWDialogue
{ {
std::string mTopic; std::string mTopic;
JournalEntry(); JournalEntry() = default;
JournalEntry (const std::string& topic, const std::string& infoId, const MWWorld::Ptr& actor); JournalEntry (const std::string& topic, const std::string& infoId, const MWWorld::Ptr& actor);

View file

@ -746,9 +746,7 @@ namespace
mVertexColourType = MyGUI::RenderManager::getInstance().getVertexFormat(); mVertexColourType = MyGUI::RenderManager::getInstance().getVertexFormat();
} }
~GlyphStream () ~GlyphStream () = default;
{
}
MyGUI::Vertex* end () const { return mVertices; } MyGUI::Vertex* end () const { return mVertices; }

View file

@ -13,10 +13,6 @@
namespace MWMechanics namespace MWMechanics
{ {
Objects::Objects()
{
}
Objects::~Objects() Objects::~Objects()
{ {
for(auto& object : mObjects) for(auto& object : mObjects)

View file

@ -26,7 +26,7 @@ namespace MWMechanics
PtrControllerMap mObjects; PtrControllerMap mObjects;
public: public:
Objects(); Objects() = default;
~Objects(); ~Objects();
void addObject (const MWWorld::Ptr& ptr); void addObject (const MWWorld::Ptr& ptr);

View file

@ -1973,11 +1973,6 @@ namespace MWRender
return SceneUtil::hasUserDescription(mObjectRoot, Constants::HerbalismLabel); return SceneUtil::hasUserDescription(mObjectRoot, Constants::HerbalismLabel);
} }
Animation::AnimState::~AnimState()
{
}
// ------------------------------ // ------------------------------
PartHolder::PartHolder(osg::ref_ptr<osg::Node> node) PartHolder::PartHolder(osg::ref_ptr<osg::Node> node)

View file

@ -207,7 +207,7 @@ protected:
mLoopCount(0), mPriority(0), mBlendMask(0), mAutoDisable(true) mLoopCount(0), mPriority(0), mBlendMask(0), mAutoDisable(true)
{ {
} }
~AnimState(); ~AnimState() = default;
float getTime() const float getTime() const
{ {

View file

@ -673,11 +673,6 @@ LocalMap::MapSegment::MapSegment()
{ {
} }
LocalMap::MapSegment::~MapSegment()
{
}
void LocalMap::MapSegment::createFogOfWarTexture() void LocalMap::MapSegment::createFogOfWarTexture()
{ {
if (mFogOfWarTexture) if (mFogOfWarTexture)

View file

@ -115,7 +115,7 @@ namespace MWRender
struct MapSegment struct MapSegment
{ {
MapSegment(); MapSegment();
~MapSegment(); ~MapSegment() = default;
void initFogOfWar(); void initFogOfWar();
void loadFogOfWar(const ESM::FogTexture& fog); void loadFogOfWar(const ESM::FogTexture& fog);

View file

@ -85,7 +85,7 @@ namespace MWSound
Sound(Sound&&) = delete; Sound(Sound&&) = delete;
public: public:
Sound() { } Sound() = default;
}; };
class Stream : public SoundBase { class Stream : public SoundBase {
@ -94,7 +94,7 @@ namespace MWSound
Stream(Stream&&) = delete; Stream(Stream&&) = delete;
public: public:
Stream() { } Stream() = default;
}; };
} }

View file

@ -58,7 +58,7 @@ namespace MWWorld
std::shared_ptr<ResolutionListener> mListener; std::shared_ptr<ResolutionListener> mListener;
public: public:
ResolutionHandle(std::shared_ptr<ResolutionListener> listener) : mListener(listener) {} ResolutionHandle(std::shared_ptr<ResolutionListener> listener) : mListener(listener) {}
ResolutionHandle() {} ResolutionHandle() = default;
}; };
class ContainerStoreListener class ContainerStoreListener

View file

@ -13,7 +13,7 @@ struct Quaternion
{ {
float mValues[4]; float mValues[4];
Quaternion() {} Quaternion() = default;
Quaternion(const osg::Quat& q) Quaternion(const osg::Quat& q)
{ {
@ -33,7 +33,7 @@ struct Vector3
{ {
float mValues[3]; float mValues[3];
Vector3() {} Vector3() = default;
Vector3(const osg::Vec3f& v) Vector3(const osg::Vec3f& v)
{ {

View file

@ -10,9 +10,6 @@ namespace
namespace Misc namespace Misc
{ {
Rng::Seed::Seed() {}
Rng::Seed::Seed(unsigned int seed) Rng::Seed::Seed(unsigned int seed)
{ {
mGenerator.seed(seed); mGenerator.seed(seed);

View file

@ -17,7 +17,7 @@ public:
{ {
std::mt19937 mGenerator; std::mt19937 mGenerator;
public: public:
Seed(); Seed() = default;
Seed(const Seed&) = delete; Seed(const Seed&) = delete;
Seed(unsigned int seed); Seed(unsigned int seed);
friend class Rng; friend class Rng;

View file

@ -38,11 +38,6 @@ namespace Shader
{ {
} }
ShaderVisitor::ShaderRequirements::~ShaderRequirements()
{
}
ShaderVisitor::ShaderVisitor(ShaderManager& shaderManager, Resource::ImageManager& imageManager, const std::string &defaultShaderPrefix) ShaderVisitor::ShaderVisitor(ShaderManager& shaderManager, Resource::ImageManager& imageManager, const std::string &defaultShaderPrefix)
: osg::NodeVisitor(TRAVERSE_ALL_CHILDREN) : osg::NodeVisitor(TRAVERSE_ALL_CHILDREN)
, mForceShaders(false) , mForceShaders(false)

View file

@ -77,7 +77,7 @@ namespace Shader
struct ShaderRequirements struct ShaderRequirements
{ {
ShaderRequirements(); ShaderRequirements();
~ShaderRequirements(); ~ShaderRequirements() = default;
// <texture stage, texture name> // <texture stage, texture name>
std::map<int, std::string> mTextures; std::map<int, std::string> mTextures;