From 463e9e9f60fe9f53dc5c103746f0d847a2c2284e Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 19 May 2020 22:14:18 -0400 Subject: [PATCH] CStaticInterference: Eliminate sign conversion warnings in constructor We can just accept a size_t to prevent warnings from occurring. --- Runtime/CStaticInterference.cpp | 2 +- Runtime/CStaticInterference.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Runtime/CStaticInterference.cpp b/Runtime/CStaticInterference.cpp index 432a6664a..7015e85e4 100644 --- a/Runtime/CStaticInterference.cpp +++ b/Runtime/CStaticInterference.cpp @@ -4,7 +4,7 @@ namespace urde { -CStaticInterference::CStaticInterference(int sourceCount) { m_sources.reserve(sourceCount); } +CStaticInterference::CStaticInterference(size_t sourceCount) { m_sources.reserve(sourceCount); } void CStaticInterference::RemoveSource(TUniqueId id) { auto iter = std::find_if(m_sources.begin(), m_sources.end(), diff --git a/Runtime/CStaticInterference.hpp b/Runtime/CStaticInterference.hpp index 2018165f9..97e3eff55 100644 --- a/Runtime/CStaticInterference.hpp +++ b/Runtime/CStaticInterference.hpp @@ -16,7 +16,7 @@ class CStaticInterference { std::vector m_sources; public: - explicit CStaticInterference(int sourceCount); + explicit CStaticInterference(size_t sourceCount); void RemoveSource(TUniqueId id); void Update(CStateManager&, float dt); float GetTotalInterference() const;