mirror of
https://github.com/rwengine/openrw.git
synced 2024-09-15 06:52:34 +02:00
Use "= default" for trivial ctor/dtor
This commit is contained in:
parent
d03a33c284
commit
cf5efb9560
@ -20,8 +20,7 @@ public:
|
||||
* @brief The Activity struct interface
|
||||
*/
|
||||
struct Activity {
|
||||
virtual ~Activity() {
|
||||
}
|
||||
virtual ~Activity() = default;
|
||||
|
||||
virtual std::string name() const = 0;
|
||||
|
||||
@ -77,8 +76,7 @@ protected:
|
||||
public:
|
||||
CharacterController();
|
||||
|
||||
virtual ~CharacterController() {
|
||||
}
|
||||
virtual ~CharacterController() = default;
|
||||
|
||||
/**
|
||||
* Get the current Activity.
|
||||
|
@ -49,8 +49,7 @@ public:
|
||||
BaseModelInfo(ModelDataType type) : type_(type) {
|
||||
}
|
||||
|
||||
virtual ~BaseModelInfo() {
|
||||
}
|
||||
virtual ~BaseModelInfo() = default;
|
||||
|
||||
ModelID id() const {
|
||||
return modelid_;
|
||||
|
@ -38,9 +38,7 @@ GameData::GameData(Logger* log, const rwfs::path& path)
|
||||
});
|
||||
}
|
||||
|
||||
GameData::~GameData() {
|
||||
/// @todo don't leak models
|
||||
}
|
||||
GameData::~GameData() = default;
|
||||
|
||||
void GameData::load() {
|
||||
index.indexGameDirectory(datpath);
|
||||
|
@ -27,8 +27,7 @@ struct AnimationKeyframe {
|
||||
, id(_id) {
|
||||
}
|
||||
|
||||
AnimationKeyframe() {
|
||||
}
|
||||
AnimationKeyframe() = default;
|
||||
};
|
||||
|
||||
struct AnimationBone {
|
||||
|
@ -21,8 +21,7 @@ CutsceneObject::CutsceneObject(GameWorld *engine, const glm::vec3 &pos,
|
||||
animator = new Animator(getClump());
|
||||
}
|
||||
|
||||
CutsceneObject::~CutsceneObject() {
|
||||
}
|
||||
CutsceneObject::~CutsceneObject() = default;
|
||||
|
||||
void CutsceneObject::tick(float dt) {
|
||||
animator->tick(dt);
|
||||
|
@ -43,8 +43,7 @@ InstanceObject::InstanceObject(GameWorld* engine, const glm::vec3& pos,
|
||||
}
|
||||
}
|
||||
|
||||
InstanceObject::~InstanceObject() {
|
||||
}
|
||||
InstanceObject::~InstanceObject() = default;
|
||||
|
||||
void InstanceObject::tick(float dt) {
|
||||
if (animator) animator->tick(dt);
|
||||
|
@ -469,5 +469,4 @@ const Renderer::ProfileInfo& OpenGLRenderer::popDebugGroup() {
|
||||
return profileInfo[0];
|
||||
}
|
||||
|
||||
Renderer::ShaderProgram::~ShaderProgram() {
|
||||
}
|
||||
Renderer::ShaderProgram::~ShaderProgram() = default;
|
||||
|
@ -33,8 +33,7 @@ struct VertexP2 {
|
||||
: position({_x, _y}) {
|
||||
}
|
||||
|
||||
VertexP2() {
|
||||
}
|
||||
VertexP2() = default;
|
||||
};
|
||||
|
||||
|
||||
@ -51,8 +50,7 @@ struct VertexP3 {
|
||||
: position({_x, _y, _z}) {
|
||||
}
|
||||
|
||||
VertexP3() {
|
||||
}
|
||||
VertexP3() = default;
|
||||
};
|
||||
|
||||
class Renderer {
|
||||
|
@ -71,8 +71,7 @@ struct TextVertex {
|
||||
, colour(_colour) {
|
||||
}
|
||||
|
||||
TextVertex() {
|
||||
}
|
||||
TextVertex() = default;
|
||||
|
||||
static const AttributeList vertex_attributes() {
|
||||
return {
|
||||
@ -132,8 +131,7 @@ TextRenderer::TextRenderer(GameRenderer* renderer) : renderer(renderer) {
|
||||
}
|
||||
}
|
||||
|
||||
TextRenderer::~TextRenderer() {
|
||||
}
|
||||
TextRenderer::~TextRenderer() = default;
|
||||
|
||||
void TextRenderer::setFontTexture(int index, const std::string& texture) {
|
||||
if (index < GAME_FONTS) {
|
||||
|
@ -2,14 +2,11 @@
|
||||
|
||||
#include <new>
|
||||
|
||||
VisualFX::LightData::~LightData() {
|
||||
}
|
||||
VisualFX::LightData::~LightData() = default;
|
||||
|
||||
VisualFX::ParticleData::~ParticleData() {
|
||||
}
|
||||
VisualFX::ParticleData::~ParticleData() = default;
|
||||
|
||||
VisualFX::TrailData::~TrailData() {
|
||||
}
|
||||
VisualFX::TrailData::~TrailData() = default;
|
||||
|
||||
VisualFX::VisualFX(VisualFX::EffectType type) : type(type) {
|
||||
switch (type) {
|
||||
|
@ -55,8 +55,7 @@ WaterRenderer::WaterRenderer(GameRenderer* renderer) : waterProg(nullptr) {
|
||||
gridDraw.addGeometry(&gridGeom);
|
||||
}
|
||||
|
||||
WaterRenderer::~WaterRenderer() {
|
||||
}
|
||||
WaterRenderer::~WaterRenderer() = default;
|
||||
|
||||
void WaterRenderer::setWaterTable(float* waterHeights, unsigned int nHeights,
|
||||
uint8_t* tiles, unsigned int nTiles) {
|
||||
|
@ -26,8 +26,8 @@ class SCMFile;
|
||||
|
||||
|
||||
struct SCMException {
|
||||
virtual ~SCMException() {
|
||||
}
|
||||
virtual ~SCMException() = default;
|
||||
|
||||
virtual std::string what() const = 0;
|
||||
};
|
||||
|
||||
@ -119,7 +119,7 @@ struct SCMThread {
|
||||
class ScriptMachine {
|
||||
public:
|
||||
ScriptMachine(GameState* state, SCMFile* file, ScriptModule* ops);
|
||||
~ScriptMachine() { }
|
||||
~ScriptMachine() = default;
|
||||
|
||||
SCMFile* getFile() const {
|
||||
return file;
|
||||
|
@ -31,8 +31,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual ~State() {
|
||||
}
|
||||
virtual ~State() = default;
|
||||
|
||||
void enterMenu(const std::shared_ptr<Menu>& menu) {
|
||||
nextMenu = menu;
|
||||
|
@ -98,8 +98,7 @@ ModelFrame* Clump::findFrame(const std::string& name) const {
|
||||
return rootframe_->findDescendant(name);
|
||||
}
|
||||
|
||||
Clump::~Clump() {
|
||||
}
|
||||
Clump::~Clump() = default;
|
||||
|
||||
void Clump::recalculateMetrics() {
|
||||
boundingRadius = std::numeric_limits<float>::min();
|
||||
|
@ -135,8 +135,7 @@ struct GeometryVertex {
|
||||
, colour(_colour) {
|
||||
}
|
||||
|
||||
GeometryVertex() {
|
||||
}
|
||||
GeometryVertex() = default;
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user