Changed: #825 Remove all warnings when compiling Ryzom

This commit is contained in:
kervala 2010-08-28 15:02:00 +02:00
parent f745142447
commit 9f43646d77
14 changed files with 26 additions and 26 deletions

View file

@ -95,7 +95,7 @@ int main (int argc, char **argv)
Password = fgets(buf, 256, stdin);
}
// crypt with md5 the password
CHashKeyMD5 hk = getMD5((uint8*)Password.c_str(), Password.size());
CHashKeyMD5 hk = getMD5((uint8*)Password.c_str(), (uint32)Password.size());
string CPassword = hk.toString();
nlinfo("The crypted password is %s", CPassword.c_str());

View file

@ -213,8 +213,8 @@ void cbInfo (CMessage &msgin, TSockId from, CCallbackNetBase &netbase)
#ifdef USE_3D
string token = "MeanPongTime ";
uint pos=line.find (token);
uint pos2=line.find (" ", pos+token.size());
string::size_type pos=line.find (token);
string::size_type pos2=line.find (" ", pos+token.size());
uint32 val = atoi(line.substr (pos+token.size(), pos2-pos-token.size()).c_str());
LagGraph.addOneValue ((float)val);
#endif
@ -309,7 +309,7 @@ int main( int argc, char **argv )
UTextContext *TextContext= Driver->createTextContext(CPath::lookup("n019003l.pfb"));
TextContext->setFontSize(18);
Camera.setPerspective(80*Pi/180, 1.33, 0.15, 1000);
Camera.setPerspective(80*(float)Pi/180, 1.33f, 0.15f, 1000);
CEvent3dMouseListener MouseListener;
MouseListener.addToServer(Driver->EventServer);

View file

@ -81,7 +81,7 @@ void CGraph::render (NL3D::UDriver *Driver, NL3D::UTextContext *TextContext)
CVertexBuffer vbuffer;
vbuffer.setVertexFormat (CVertexBuffer::PositionFlag);
vbuffer.setNumVertices (Values.size() * 2);
vbuffer.setNumVertices ((uint32)Values.size() * 2);
float pos = X+Width-1;
uint i = 0;

View file

@ -264,7 +264,7 @@ int main ()
}
// Keyboard
if (arrayObj.size())
if (!arrayObj.empty())
{
// Manipulate selected primitive
keyboard (pDriver, deltaTime, *(arrayObj[selected]));
@ -273,7 +273,8 @@ int main ()
if (pDriver->AsyncListener.isKeyDown (KeyDELETE))
{
// remove all but one
if (arrayObj.size() > 1) {
if (arrayObj.size() > 1)
{
arrayObj[arrayObj.size()-1]->remove (*container, *pScene);
arrayObj.resize (arrayObj.size()-1);
}
@ -281,7 +282,7 @@ int main ()
// Check selected
if (selected>=arrayObj.size())
selected=arrayObj.size()-1;
selected=(uint)arrayObj.size()-1;
//if (selected<0)
// selected=0;
@ -312,8 +313,7 @@ int main ()
clearColor=CRGBA::Black;
// Setup view matrix
int size=arrayObj.size();
if (size)
if (!arrayObj.empty())
{
// Setup hotspot for the 3d listener
plistener->setHotSpot (arrayObj[selected]->getPos());

View file

@ -177,7 +177,7 @@ int main(int argc, char* argv[])
}
// Triangle count
triangles+=faces.size();
triangles+=(uint32)faces.size();
}
}
else

View file

@ -82,7 +82,7 @@ class CMyZoneLighter : public CZoneLighter
pgId= min(pgId, (uint)(BAR_LENGTH-1));
sprintf (msg, "\r%s: %s", message, progressbar[pgId]);
uint i;
for (i=strlen(msg); i<79; i++)
for (i=(uint)strlen(msg); i<79; i++)
msg[i]=' ';
msg[i]=0;
printf ("%s\r", msg);

View file

@ -114,7 +114,7 @@
Optimization="4"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="../../../common/src/"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;LIBXML_STATIC"
StringPooling="true"
MinimalRebuild="true"
ExceptionHandling="2"

View file

@ -404,8 +404,7 @@ void CSBrickSheet::build (const NLGEORGES::UFormElm &root)
// **** Magic only: try to get a ResistType against this brick
for(i=0;i<Properties.size();i++)
{
string text= Properties[i].Text;
strlwr(text);
string text= toLower(Properties[i].Text);
// *** If the property is a DamageType
const string dmgTypeProp= "ma_dmg_type:";

View file

@ -1304,6 +1304,7 @@ void postlogInit()
nmsg = "Loading sheets...";
ProgressBar.newMessage ( ClientCfg.buildLoadingString(nmsg) );
SheetMngr.setOutputDataPath("../../client/data");
SheetMngr.load (ProgressBar, ClientCfg.UpdatePackedSheet, ClientCfg.NeedComputeVS, ClientCfg.DumpVSIndex);
initLast = initCurrent;

View file

@ -71,7 +71,7 @@ std::string IActionHandler::getParam (const string &Params, const string &ParamN
{
string allparam = Params;
skipBlankAtStart (allparam);
string param = strlwr (ParamName);
string param = toLower (ParamName);
while (allparam.size() > 0)
{
std::string::size_type e = allparam.find('=');

View file

@ -25,10 +25,11 @@
//-----------------------------------------------
CDirLightSetup::CDirLightSetup() : Ambiant(0, 0, 0),
Diffuse(255, 255, 255),
Specular(0, 0, 0),
Direction(1.f, 0.f, 0.f)
CDirLightSetup::CDirLightSetup() :
Ambiant(0, 0, 0),
Diffuse(255, 255, 255),
Specular(0, 0, 0),
Direction(1.f, 0.f, 0.f)
{
}

View file

@ -170,9 +170,9 @@ namespace <xsl:value-of select="@name"/>
</xsl:if>
// unused interceptors
std::string fwdBuildModuleManifest() const { return std::string(); }
void fwdOnModuleUp(NLNET::IModuleProxy *moduleProxy) {};
void fwdOnModuleDown(NLNET::IModuleProxy *moduleProxy) {};
void fwdOnModuleSecurityChange(NLNET::IModuleProxy *moduleProxy) {};
void fwdOnModuleUp(NLNET::IModuleProxy *moduleProxy) {}
void fwdOnModuleDown(NLNET::IModuleProxy *moduleProxy) {}
void fwdOnModuleSecurityChange(NLNET::IModuleProxy *moduleProxy) {}
// process module message interceptor
bool fwdOnProcessModuleMessage(NLNET::IModuleProxy *sender, const NLNET::CMessage &amp;message);

View file

@ -97,7 +97,7 @@ bool GetBool (const char *var)
// Available ?
if (variable)
{
string _bool = strlwr (variable->asString ());
string _bool = toLower (variable->asString ());
if (_bool == "true")
return true;
if (_bool == "false")

View file

@ -495,8 +495,7 @@ CDisplayDlg::TDriver CDisplayDlg::getActualDriver() const
std::string deviceName;
uint64 drvVersion;
CSystemInfo::getVideoInfo(deviceName, drvVersion);
strlwr(deviceName);
return strstr(deviceName.c_str(), "radeon") != NULL ? Direct3D : OpenGL;
return strstr(toLower(deviceName).c_str(), "radeon") != NULL ? Direct3D : OpenGL;
}
}
return OpenGL;