From 4df1e68047488ec00a264c076bb3222715f42295 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 10 Mar 2017 16:40:52 +0300 Subject: Fix new style issue detected by mplint. new class() -> new class --- src/being/being.cpp | 6 +++--- src/being/compoundsprite.cpp | 4 ++-- src/being/playerinfo.cpp | 2 +- src/being/playerrelations.cpp | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/being') diff --git a/src/being/being.cpp b/src/being/being.cpp index 90638ef55..333e60d12 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -4496,7 +4496,7 @@ void Being::updateHit(const int amount) restrict2 Equipment *Being::getEquipment() restrict2 { - Equipment *restrict const eq = new Equipment(); + Equipment *restrict const eq = new Equipment; Equipment::Backend *restrict const bk = new BeingEquipBackend(this); eq->setBackend(bk); return eq; @@ -4845,7 +4845,7 @@ void Being::addItemParticles(const int id, ParticleInfo *restrict pi = nullptr; if (it == mSpriteParticles.end()) { - pi = new ParticleInfo(); + pi = new ParticleInfo; mSpriteParticles[id] = pi; } else @@ -4883,7 +4883,7 @@ void Being::addItemParticlesCards(const int id, ParticleInfo *restrict pi = nullptr; if (it == mSpriteParticles.end()) { - pi = new ParticleInfo(); + pi = new ParticleInfo; mSpriteParticles[id] = pi; } else diff --git a/src/being/compoundsprite.cpp b/src/being/compoundsprite.cpp index 72f3943fe..4f5c6bf3e 100644 --- a/src/being/compoundsprite.cpp +++ b/src/being/compoundsprite.cpp @@ -337,7 +337,7 @@ void CompoundSprite::redraw() const if (!surface) return; - SurfaceGraphics *graphics = new SurfaceGraphics(); + SurfaceGraphics *graphics = new SurfaceGraphics; graphics->setBlitMode(BlitMode::BLIT_GFX); graphics->setTarget(surface); graphics->beginDraw(); @@ -521,7 +521,7 @@ bool CompoundSprite::updateFromCache() const void CompoundSprite::initCurrentCacheItem() const { delete mCacheItem; - mCacheItem = new CompoundItem(); + mCacheItem = new CompoundItem; mCacheItem->image = mImage; mCacheItem->alphaImage = mAlphaImage; // mCacheItem->alpha = mAlpha; diff --git a/src/being/playerinfo.cpp b/src/being/playerinfo.cpp index 14cc909df..25620d5ba 100644 --- a/src/being/playerinfo.cpp +++ b/src/being/playerinfo.cpp @@ -464,7 +464,7 @@ void stateChange(const StateT state) if (!mInventory) { mInventory = new Inventory(InventoryType::Inventory); - mEquipment = new Equipment(); + mEquipment = new Equipment; mCartInventory = new Inventory(InventoryType::Cart); } } diff --git a/src/being/playerrelations.cpp b/src/being/playerrelations.cpp index c972f25ca..4a2d71ee2 100644 --- a/src/being/playerrelations.cpp +++ b/src/being/playerrelations.cpp @@ -361,7 +361,7 @@ void PlayerRelationsManager::setRelation(const std::string &player_name, StringVect *PlayerRelationsManager::getPlayers() const { - StringVect *const retval = new StringVect(); + StringVect *const retval = new StringVect; FOR_EACH (PlayerRelationsCIter, it, mRelations) { @@ -377,7 +377,7 @@ StringVect *PlayerRelationsManager::getPlayers() const StringVect *PlayerRelationsManager::getPlayersByRelation( const RelationT rel) const { - StringVect *const retval = new StringVect(); + StringVect *const retval = new StringVect; FOR_EACH (PlayerRelationsCIter, it, mRelations) { -- cgit v1.2.3-70-g09d2