General: Resolve -Wcast-qual warnings

We can just avoid casting away const in order to resolve these warnings.
This commit is contained in:
Lioncash 2020-08-23 15:52:14 -04:00
parent cadf85bc58
commit a32e21df14
3 changed files with 5 additions and 7 deletions

View File

@ -73,7 +73,7 @@ public:
};
protected:
const hecl::Database::Project* m_proj = nullptr;
hecl::Database::Project* m_proj = nullptr;
const hecl::Database::DataSpecEntry* m_origSpec = nullptr;
const hecl::Database::DataSpecEntry* m_pcSpec = nullptr;
/* Used to resolve cooked paths */
@ -155,9 +155,7 @@ public:
void Shutdown() { CancelBackgroundIndex(); }
bool IsBusy() const { return m_asyncLoadMap.size() != 0; }
SObjectTag TagFromPath(hecl::SystemStringView path) const {
return TagFromPath(hecl::ProjectPath(*(hecl::Database::Project*)m_proj, path));
}
SObjectTag TagFromPath(hecl::SystemStringView path) const { return TagFromPath(hecl::ProjectPath(*m_proj, path)); }
~ProjectResourceFactoryBase() override { Shutdown(); }
};

View File

@ -4,6 +4,6 @@
namespace urde {
void CDefaultWeaponRenderer::AddParticleGen(const CParticleGen& gen) { ((CParticleGen&)gen).Render(); }
void CDefaultWeaponRenderer::AddParticleGen(CParticleGen& gen) { gen.Render(); }
} // namespace urde

View File

@ -6,12 +6,12 @@ class CParticleGen;
class IWeaponRenderer {
public:
virtual ~IWeaponRenderer() = default;
virtual void AddParticleGen(const CParticleGen&) = 0;
virtual void AddParticleGen(CParticleGen&) = 0;
};
class CDefaultWeaponRenderer : public IWeaponRenderer {
public:
void AddParticleGen(const CParticleGen&) override;
void AddParticleGen(CParticleGen&) override;
};
} // namespace urde