From 9275ce5175d818643f1572132a42c3613c3ffb11 Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 24 Jul 2010 22:47:42 +0200 Subject: [PATCH] Changed: #825 Remove all warning when compiling Ryzom --- code/nel/include/nel/net/message_recorder.h | 7 +++++-- code/nel/src/3d/driver/opengl/driver_opengl.cpp | 8 +++----- code/nel/src/3d/driver/opengl/stdopengl.h | 2 ++ code/nel/src/misc/stdmisc.h | 3 +++ 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/code/nel/include/nel/net/message_recorder.h b/code/nel/include/nel/net/message_recorder.h index a507905e7..cc02b1d27 100644 --- a/code/nel/include/nel/net/message_recorder.h +++ b/code/nel/include/nel/net/message_recorder.h @@ -71,7 +71,8 @@ struct TMessageRecord { stream.serial( s_event ); Event = StringToEvent( s_event ); - stream.serialHex( (uint32&)SockId ); + uint32 sockId = (uint32)SockId; + stream.serialHex( sockId ); stream.serial( len ); stream.serialBuffer( Message.bufferToFill( len ), len ); } @@ -79,7 +80,9 @@ struct TMessageRecord { s_event = EventToString( Event ); stream.serial( s_event ); - stream.serialHex( (uint32&)SockId ); + uint32 sockId; + stream.serialHex( sockId ); + SockId = (NLNET::TSockId)sockId; len = Message.length(); stream.serial( len ); stream.serialBuffer( const_cast(Message.buffer()), len ); // assumes the message contains plain text diff --git a/code/nel/src/3d/driver/opengl/driver_opengl.cpp b/code/nel/src/3d/driver/opengl/driver_opengl.cpp index 97666bbed..61b782297 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl.cpp @@ -346,7 +346,6 @@ bool CDriverGL::setupDisplay() for(uint i = 0; i < lines.size(); i++) nlinfo("3D: %s", lines[i].c_str()); - // #ifdef NL_OS_WINDOWS NL3D::registerWGlExtensions (_Extensions, _hDC); #endif // ifdef NL_OS_WINDOWS @@ -358,6 +357,7 @@ bool CDriverGL::setupDisplay() nlwarning("Missing Required GL extension: GL_ARB_multitexture. Update your driver"); throw EBadDisplay("Missing Required GL extension: GL_ARB_multitexture. Update your driver"); } + if(!_Extensions.EXTTextureEnvCombine) { nlwarning("Missing Important GL extension: GL_EXT_texture_env_combine => All envcombine are setup to GL_MODULATE!!!"); @@ -1017,7 +1017,7 @@ void CDriverGL::setupViewport (const class CViewport& viewport) // Setup gl viewport sint ix=(sint)((float)clientWidth*x+0.5f); clamp (ix, 0, clientWidth); - int iy=(int)((float)clientHeight*y+0.5f); + sint iy=(sint)((float)clientHeight*y+0.5f); clamp (iy, 0, clientHeight); sint iwidth=(sint)((float)clientWidth*width+0.5f); clamp (iwidth, 0, clientWidth-ix); @@ -1097,7 +1097,7 @@ void CDriverGL::setupScissor (const class CScissor& scissor) // Setup gl scissor sint ix0=(sint)floor((float)clientWidth * x + 0.5f); clamp (ix0, 0, clientWidth); - int iy0=(int)floor((float)clientHeight* y + 0.5f); + sint iy0=(sint)floor((float)clientHeight* y + 0.5f); clamp (iy0, 0, clientHeight); sint ix1=(sint)floor((float)clientWidth * (x+width) + 0.5f ); @@ -1112,8 +1112,6 @@ void CDriverGL::setupScissor (const class CScissor& scissor) glScissor (ix0, iy0, iwidth, iheight); glEnable(GL_SCISSOR_TEST); - - } } diff --git a/code/nel/src/3d/driver/opengl/stdopengl.h b/code/nel/src/3d/driver/opengl/stdopengl.h index 697aa2944..3f5015e78 100644 --- a/code/nel/src/3d/driver/opengl/stdopengl.h +++ b/code/nel/src/3d/driver/opengl/stdopengl.h @@ -38,3 +38,5 @@ #include "nel/misc/mem_stream.h" #include "nel/misc/time_nl.h" #include "nel/misc/command.h" + +#include "nel/3d/driver.h" diff --git a/code/nel/src/misc/stdmisc.h b/code/nel/src/misc/stdmisc.h index 0da984781..12779c364 100644 --- a/code/nel/src/misc/stdmisc.h +++ b/code/nel/src/misc/stdmisc.h @@ -46,3 +46,6 @@ #include "nel/misc/fast_mem.h" #include "nel/misc/system_info.h" #include "nel/misc/mem_displayer.h" +#include "nel/misc/stream.h" +#include "nel/misc/path.h" +#include "nel/misc/string_common.h"