Fixed: Warnings with GCC
--HG-- branch : develop
This commit is contained in:
parent
ea5b041844
commit
592bb16c11
2 changed files with 22 additions and 10 deletions
|
@ -88,6 +88,7 @@ public:
|
||||||
const CAIEventType &operator=(const CAIEventType &other)
|
const CAIEventType &operator=(const CAIEventType &other)
|
||||||
{
|
{
|
||||||
_val=other._val;
|
_val=other._val;
|
||||||
|
return *this;
|
||||||
}
|
}
|
||||||
bool operator==(const CAIEventType &other) const
|
bool operator==(const CAIEventType &other) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -844,6 +844,7 @@ void CScreenshotIslands::processProximityBuffer(TBuffer & inputBuffer, uint32 li
|
||||||
|
|
||||||
bool lastValue = false;
|
bool lastValue = false;
|
||||||
CVector2f firstPixelBorder;
|
CVector2f firstPixelBorder;
|
||||||
|
firstPixelBorder.set(0.f, 0.f);
|
||||||
uint32 nbPixelsBorder = 0;
|
uint32 nbPixelsBorder = 0;
|
||||||
|
|
||||||
for (uint32 x=0;x<lineLength;++x)
|
for (uint32 x=0;x<lineLength;++x)
|
||||||
|
@ -907,6 +908,7 @@ void CScreenshotIslands::processProximityBuffer(TBuffer & inputBuffer, uint32 li
|
||||||
{
|
{
|
||||||
bool lastValue = false;
|
bool lastValue = false;
|
||||||
CVector2f firstPixelBorder;
|
CVector2f firstPixelBorder;
|
||||||
|
firstPixelBorder.set(0.f, 0.f);
|
||||||
uint32 nbPixelsBorder = 0;
|
uint32 nbPixelsBorder = 0;
|
||||||
|
|
||||||
for(uint32 y=0; y<numLines; y++)
|
for(uint32 y=0; y<numLines; y++)
|
||||||
|
@ -1379,12 +1381,19 @@ void CScreenshotIslands::buildIslandsTextures()
|
||||||
{
|
{
|
||||||
string seasonSuffix = *itSeason;
|
string seasonSuffix = *itSeason;
|
||||||
|
|
||||||
int season;
|
sint season = -1;
|
||||||
|
|
||||||
if (seasonSuffix == "_sp") season = CSeason::Spring;
|
if (seasonSuffix == "_sp") season = CSeason::Spring;
|
||||||
else if (seasonSuffix == "_su") season = CSeason::Summer;
|
else if (seasonSuffix == "_su") season = CSeason::Summer;
|
||||||
else if (seasonSuffix == "_au") season = CSeason::Autumn;
|
else if (seasonSuffix == "_au") season = CSeason::Autumn;
|
||||||
else if (seasonSuffix == "_wi") season = CSeason::Winter;
|
else if (seasonSuffix == "_wi") season = CSeason::Winter;
|
||||||
|
|
||||||
|
if (season == -1)
|
||||||
|
{
|
||||||
|
nlwarning("Unknown season suffix %s, skipping...", seasonSuffix.c_str());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Iterations on Continents
|
// Iterations on Continents
|
||||||
TContinentsData::iterator itCont(_ContinentsData.begin()), lastCont(_ContinentsData.end());
|
TContinentsData::iterator itCont(_ContinentsData.begin()), lastCont(_ContinentsData.end());
|
||||||
for( ; itCont != lastCont ; ++itCont)
|
for( ; itCont != lastCont ; ++itCont)
|
||||||
|
@ -1673,11 +1682,9 @@ inline bool RGB2HSV(const CRGBA & rgba, uint & Hue, uint & Sat, uint & Val)
|
||||||
{
|
{
|
||||||
double Min_, Max_, Delta, H, S, V;
|
double Min_, Max_, Delta, H, S, V;
|
||||||
|
|
||||||
H = 0.0;
|
|
||||||
Min_ = min(min(rgba.R, rgba.G), rgba.B);
|
Min_ = min(min(rgba.R, rgba.G), rgba.B);
|
||||||
Max_ = max(max(rgba.R, rgba.G), rgba.B);
|
Max_ = max(max(rgba.R, rgba.G), rgba.B);
|
||||||
Delta = ( Max_ - Min_);
|
Delta = ( Max_ - Min_);
|
||||||
V = Max_;
|
|
||||||
|
|
||||||
if(Max_ != 0.0)
|
if(Max_ != 0.0)
|
||||||
{
|
{
|
||||||
|
@ -1685,11 +1692,15 @@ inline bool RGB2HSV(const CRGBA & rgba, uint & Hue, uint & Sat, uint & Val)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
S = 0.0;
|
Hue = 0;
|
||||||
H = -1;
|
Sat = 0;
|
||||||
|
Val = 0;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
H = 0.0;
|
||||||
|
V = Max_;
|
||||||
|
|
||||||
if(rgba.R == Max_)
|
if(rgba.R == Max_)
|
||||||
{
|
{
|
||||||
H = (rgba.G - rgba.B) / Delta;
|
H = (rgba.G - rgba.B) / Delta;
|
||||||
|
|
Loading…
Reference in a new issue