CStaticInterference: Eliminate sign conversion warnings in constructor

We can just accept a size_t to prevent warnings from occurring.
This commit is contained in:
Lioncash 2020-05-19 22:14:18 -04:00
parent 871d3dc6ec
commit 463e9e9f60
2 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@
namespace urde { namespace urde {
CStaticInterference::CStaticInterference(int sourceCount) { m_sources.reserve(sourceCount); } CStaticInterference::CStaticInterference(size_t sourceCount) { m_sources.reserve(sourceCount); }
void CStaticInterference::RemoveSource(TUniqueId id) { void CStaticInterference::RemoveSource(TUniqueId id) {
auto iter = std::find_if(m_sources.begin(), m_sources.end(), auto iter = std::find_if(m_sources.begin(), m_sources.end(),

View File

@ -16,7 +16,7 @@ class CStaticInterference {
std::vector<CStaticInterferenceSource> m_sources; std::vector<CStaticInterferenceSource> m_sources;
public: public:
explicit CStaticInterference(int sourceCount); explicit CStaticInterference(size_t sourceCount);
void RemoveSource(TUniqueId id); void RemoveSource(TUniqueId id);
void Update(CStateManager&, float dt); void Update(CStateManager&, float dt);
float GetTotalInterference() const; float GetTotalInterference() const;