Change a few things to avoid warnings with gcc. Should fix #2359
This was SVN commit r14529.
This commit is contained in:
parent
baf6925b66
commit
d0e57cb0ff
@ -717,13 +717,15 @@ void CXMLReader::ReadEnvironment(XMBElement parent)
|
||||
// graphics are disabled
|
||||
if (!m_MapReader.pWaterMan)
|
||||
continue;
|
||||
|
||||
float this_avoids_a_warning_about_unused_variables = 0;
|
||||
|
||||
if (element_name == el_type)
|
||||
{
|
||||
// TODO: implement this, when WaterManager supports it
|
||||
}
|
||||
else if (element_name == el_shininess)
|
||||
{
|
||||
// deprecated.
|
||||
}
|
||||
#define READ_COLOUR(el, out) \
|
||||
else if (element_name == el) \
|
||||
{ \
|
||||
@ -742,7 +744,6 @@ void CXMLReader::ReadEnvironment(XMBElement parent)
|
||||
} \
|
||||
|
||||
READ_COLOUR(el_colour, m_MapReader.pWaterMan->m_WaterColor)
|
||||
READ_FLOAT(el_shininess, this_avoids_a_warning_about_unused_variables)
|
||||
READ_FLOAT(el_waviness, m_MapReader.pWaterMan->m_Waviness)
|
||||
READ_FLOAT(el_murkiness, m_MapReader.pWaterMan->m_Murkiness)
|
||||
READ_COLOUR(el_tint, m_MapReader.pWaterMan->m_WaterTint)
|
||||
|
@ -363,7 +363,7 @@ void WaterManager::CreateSuperfancyInfo(CSimulation2* simulation)
|
||||
// search a 5x5 array with us in the center (do not search me)
|
||||
// much faster since we spiral search and can just stop once we've found the shore.
|
||||
// also everything is precomputed and we get exact results instead.
|
||||
int offset[24] = { -1,1,-m_MapSize,+m_MapSize, -1-m_MapSize,+1-m_MapSize,-1+m_MapSize,1+m_MapSize,
|
||||
size_t offset[24] = { -1,1,-m_MapSize,+m_MapSize, -1-m_MapSize,+1-m_MapSize,-1+m_MapSize,1+m_MapSize,
|
||||
-2,2,-2*m_MapSize,2*m_MapSize,-2-m_MapSize,-2+m_MapSize,2-m_MapSize,2+m_MapSize,
|
||||
-1-2*m_MapSize,+1-2*m_MapSize,-1+2*m_MapSize,1+2*m_MapSize,
|
||||
-2-2*m_MapSize,2+2*m_MapSize,-2+2*m_MapSize,2-2*m_MapSize };
|
||||
|
Loading…
Reference in New Issue
Block a user