Fixed a couple of warnings

dev
Tomasz Kapuściński 2023-04-15 02:45:33 +02:00
parent 37b403c46d
commit b66ea8bcee
5 changed files with 9 additions and 9 deletions

View File

@ -63,10 +63,10 @@ struct Color : glm::vec4
//! Returns a string (r, g, b, a)
inline std::string ToString() const
{
std::stringstream s;
s.precision(3);
s << "(" << r << ", " << g << ", " << b << ", " << a << ")";
return s.str();
std::stringstream stream;
stream.precision(3);
stream << "(" << r << ", " << g << ", " << b << ", " << a << ")";
return stream.str();
}
inline bool operator==(const Color &other) const

View File

@ -366,8 +366,8 @@ void CLightning::StrikeAtPos(glm::vec3 pos)
if (dist < deep)
{
glm::vec3 pos = eye+((m_pos-eye)*0.2f); // like so close!
m_sound->Play(SOUND_BLITZ, pos);
glm::vec3 position = eye+((m_pos-eye)*0.2f); // like so close!
m_sound->Play(SOUND_BLITZ, position);
m_camera->StartOver(CAM_OVER_EFFECT_LIGHTNING, m_pos, 1.0f);

View File

@ -98,7 +98,6 @@ void CPlanet::LoadTexture()
void CPlanet::Draw()
{
CDevice* device = m_engine->GetDevice();
float eyeDirH = m_engine->GetEyeDirH();
float eyeDirV = m_engine->GetEyeDirV();

View File

@ -826,7 +826,8 @@ bool CPyro::EventProcess(const Event &event)
ParticleType type;
int r = rand()%2;
if (r == 0) type = PARTISMOKE1;
if (r == 1) type = PARTISMOKE2;
else type = PARTISMOKE2;
m_particle->CreateParticle(pos, speed, dim, type, 6.0f);
}

View File

@ -605,7 +605,7 @@ bool CTerrain::CreateMosaic(int ox, int oy, int step, int objRank)
float pixel = 1.0f/256.0f; // 1 pixel cover (*)
float dp = 1.0f/512.0f;
glm::vec2 uv;
glm::vec2 uv = { 0.0f, 0.0f };
for (int my = 0; my < m_textureSubdivCount; my++)
{