- a few code cleanup items while doing some testing in VC++ 2010

This commit is contained in:
Mark Vejvoda 2012-04-17 19:42:53 +00:00
parent aa831dbb61
commit 329bb58b04
9 changed files with 14 additions and 13 deletions

View File

@ -84,8 +84,8 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalOptions>/arch:SSE2 %(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>..\..\source\win32_deps\wxWidgets-2.8.10\lib\vc_lib\mswd;..\..\source\win32_deps\wxWidgets-2.8.10\include\msvc;..\..\source\shared_lib\include\util;..\..\source\shared_lib\include\platform\win32;..\..\source\shared_lib\include\graphics\gl;..\..\source\win32_deps\include;..\..\source\shared_lib\include\graphics;..\..\source\win32_deps\wxWidgets-2.8.10\include;..\..\source\shared_lib\include\platform\sdl;../../source/shared_lib/include/streflop;../../source/shared_lib/include/platform/common;../../source/win32_deps/SDL-1.2.x/include;../../source/win32_deps/curl-7.21.3/include;..\..\source\glest_game\graphics;..\..\source\shared_lib\include\xml;../../source/win32_deps/xerces-c-3.0.1/src;..\..\source\glest_game\global;..\..\source\glest_game\sound;..\..\source\shared_lib\include\sound;..\..\source\glest_game\game;../../source/shared_lib/include/map;../../source/win32_deps/lpng141;..\..\source\glest_game\facilities;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>"..\..\source\win32_deps\wxWidgets-2.8.10\lib\vc_lib\mswd";"..\..\source\win32_deps\wxWidgets-2.8.10\include\msvc";..\..\source\shared_lib\include\util;..\..\source\shared_lib\include\platform\win32;..\..\source\shared_lib\include\graphics\gl;..\..\source\win32_deps\include;..\..\source\shared_lib\include\graphics;"..\..\source\win32_deps\wxWidgets-2.8.10\include";..\..\source\shared_lib\include\platform\sdl;../../source/shared_lib/include/streflop;../../source/shared_lib/include/platform/common;"../../source/win32_deps/SDL-1.2.x/include";"../../source/win32_deps/curl-7.21.3/include";..\..\source\glest_game\graphics;..\..\source\shared_lib\include\xml;"../../source/win32_deps/xerces-c-3.0.1/src";..\..\source\glest_game\global;..\..\source\glest_game\sound;..\..\source\shared_lib\include\sound;..\..\source\glest_game\game;../../source/shared_lib/include/map;../../source/win32_deps/lpng141;..\..\source\glest_game\facilities;"../../source/win32_deps/glew-1.7.0/include";%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;CURL_STATICLIB;UNICODE;GLEW_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>

View File

@ -106,9 +106,9 @@
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<WholeProgramOptimization>false</WholeProgramOptimization>
<AdditionalIncludeDirectories>../../source/shared_lib/include/graphics;../../source/shared_lib/include/graphics/gl;../../source/shared_lib/include/platform;../../source/shared_lib/include/platform/win32;../../source/shared_lib/include/sound;../../source/shared_lib/include/sound/ds8;../../source/shared_lib/include/util;../../source/shared_lib/include/lua;../../source/shared_lib/include/xml;../../source/shared_lib/include/tinyxml;../../source/glest_game/ai;../../source/glest_game/facilities;../../source/glest_game/game;../../source/glest_game/global;../../source/glest_game/graphics;../../source/glest_game/gui;../../source/glest_game/main;../../source/glest_game/menu;../../source/glest_game/network;../../source/glest_game/sound;../../source/glest_game/type_instances;../../source/glest_game/types;../../source/glest_game/world;../../source/win32_deps/include;../../source/win32_deps/xerces-c-3.0.1/src;../../source/win32_deps/SDL-1.2.x/include;../../source/shared_lib/include/platform/sdl;../../source/shared_lib/include/sound/openal;../../source/win32_deps/openal-soft-1.12.854/include;../../source/shared_lib/include/platform/posix;../../source/shared_lib/include/streflop;../../source/shared_lib/include/platform/common;../../source/win32_deps/curl-7.21.3/include;../../source/shared_lib/include/map;../../source/win32_deps/libircclient/include</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>../../source/shared_lib/include/graphics;../../source/shared_lib/include/graphics/gl;../../source/shared_lib/include/platform;../../source/shared_lib/include/platform/win32;../../source/shared_lib/include/sound;../../source/shared_lib/include/sound/ds8;../../source/shared_lib/include/util;../../source/shared_lib/include/lua;../../source/shared_lib/include/xml;../../source/shared_lib/include/tinyxml;../../source/glest_game/ai;../../source/glest_game/facilities;../../source/glest_game/game;../../source/glest_game/global;../../source/glest_game/graphics;../../source/glest_game/gui;../../source/glest_game/main;../../source/glest_game/menu;../../source/glest_game/network;../../source/glest_game/sound;../../source/glest_game/type_instances;../../source/glest_game/types;../../source/glest_game/world;../../source/win32_deps/include;../../source/win32_deps/xerces-c-3.0.1/src;../../source/win32_deps/SDL-1.2.x/include;../../source/shared_lib/include/platform/sdl;../../source/shared_lib/include/sound/openal;../../source/win32_deps/openal-soft-1.12.854/include;../../source/shared_lib/include/platform/posix;../../source/shared_lib/include/streflop;../../source/shared_lib/include/platform/common;../../source/win32_deps/curl-7.21.3/include;../../source/shared_lib/include/map;../../source/win32_deps/libircclient/include;../../source/win32_deps/glew-1.7.0/include</AdditionalIncludeDirectories>
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;XML_LIBRARY;USE_PCH=1;_CRT_SECURE_NO_WARNINGS;USE_STREFLOP;STREFLOP_SSE;LIBM_COMPILING_FLT32;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;XML_LIBRARY;USE_PCH=1;_CRT_SECURE_NO_WARNINGS;USE_STREFLOP;STREFLOP_SSE;LIBM_COMPILING_FLT32;CURL_STATICLIB;UNICODE;GLEW_STATIC%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>

View File

@ -94,8 +94,8 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<WholeProgramOptimization>false</WholeProgramOptimization>
<AdditionalIncludeDirectories>../../source/shared_lib/include;../../source/shared_lib/include/graphics;../../source/shared_lib/include/graphics/gl;../../source/shared_lib/include/platform;../../source/shared_lib/include/platform/win32;../../source/shared_lib/include/sound;../../source/shared_lib/include/sound/ds8;../../source/shared_lib/include/util;../../source/shared_lib/include/lua;../../source/shared_lib/include/xml;../../source/win32_deps/include;../../source/win32_deps/xerces-c-3.0.1/src;../../source/win32_deps/xerces-c-3.0.1/src/xercesc/xinclude;../../source/win32_deps/lpng141;../../source/win32_deps/jpeg-8a;../../source/win32_deps/SDL-1.2.x/include;../../source/shared_lib/include/platform/sdl;../../source/win32_deps/openal-soft-1.12.854/include;../../source/shared_lib/include/sound/openal;../../source/shared_lib/include/platform/posix;../../source/shared_lib/include/streflop;../../source/shared_lib/include/streflop/libm_flt32_source;../../source/shared_lib/include/platform/common;../../source/win32_deps/curl-7.21.3/include;../../source/shared_lib/include/map;../../source/shared_lib/include/platform/miniupnpc;../../source/shared_lib/include/libircclient/include;../../source/shared_lib/include/feathery_ftp</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;USE_PCH=1;USE_STREFLOP;STREFLOP_SSE;STREFLOP_RANDOM_GEN_SIZE=32;LIBM_COMPILING_FLT32;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>../../source/shared_lib/include;../../source/shared_lib/include/graphics;../../source/shared_lib/include/graphics/gl;../../source/shared_lib/include/platform;../../source/shared_lib/include/platform/win32;../../source/shared_lib/include/sound;../../source/shared_lib/include/sound/ds8;../../source/shared_lib/include/util;../../source/shared_lib/include/lua;../../source/shared_lib/include/xml;../../source/win32_deps/include;"../../source/win32_deps/xerces-c-3.0.1/src";"../../source/win32_deps/xerces-c-3.0.1/src/xercesc/xinclude";../../source/win32_deps/lpng141;"../../source/win32_deps/jpeg-8a";"../../source/win32_deps/SDL-1.2.x/include";../../source/shared_lib/include/platform/sdl;"../../source/win32_deps/openal-soft-1.12.854/include";../../source/shared_lib/include/sound/openal;../../source/shared_lib/include/platform/posix;../../source/shared_lib/include/streflop;../../source/shared_lib/include/streflop/libm_flt32_source;../../source/shared_lib/include/platform/common;"../../source/win32_deps/curl-7.21.3/include";../../source/shared_lib/include/map;../../source/shared_lib/include/platform/miniupnpc;../../source/shared_lib/include/libircclient/include;../../source/shared_lib/include/feathery_ftp;"../../source/win32_deps/ftgl-2.1.3-rc5/src";"../../source/win32_deps/freetype-2.4.4/include";"../../source/win32_deps/glew-1.7.0/include";../../source/shared_lib/include/graphics/md5;"../../source/shared_lib/include/graphics/freetype-gl";../../source/shared_lib/include/streflop/softfloat;</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;USE_PCH=1;USE_STREFLOP;STREFLOP_SSE;STREFLOP_RANDOM_GEN_SIZE=32;LIBM_COMPILING_FLT32;CURL_STATICLIB;UNICODE;USE_FTGL;TA3D_PLATFORM_MSVC;TA3D_PLATFORM_WINDOWS;STATICLIB;USE_FREETYPEGL;GLEW_STATIC%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@ -167,6 +167,7 @@
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsC</CompileAs>
</ClCompile>
<ClCompile Include="..\..\source\shared_lib\sources\platform\sdl\gl_wrap.cpp" />
<ClCompile Include="..\..\source\shared_lib\sources\platform\win32\glob.cpp" />
<ClCompile Include="..\..\source\win32_deps\src\glprocs.c" />
<ClCompile Include="..\..\source\shared_lib\sources\libircclient\src\libircclient.c" />
<ClCompile Include="..\..\source\shared_lib\sources\map\map_preview.cpp" />
@ -240,7 +241,6 @@
<ClCompile Include="..\..\source\shared_lib\sources\platform\sdl\window_gl.cpp" />
<ClCompile Include="..\..\source\shared_lib\sources\platform\win32\factory_repository.cpp" />
<ClCompile Include="..\..\source\shared_lib\sources\platform\win32\gl_wrap_billy.cpp" />
<ClCompile Include="..\..\source\shared_lib\sources\platform\win32\glob.c" />
<ClCompile Include="..\..\source\shared_lib\sources\platform\win32\platform_util.cpp" />
<ClCompile Include="..\..\source\shared_lib\sources\platform\posix\ircclient.cpp" />
</ItemGroup>

View File

@ -30,7 +30,7 @@
#include "cache_manager.h"
#include "string_utils.h"
#include "map_preview.h"
#include <iterator>
#include "leak_dumper.h"
namespace Glest{ namespace Game{

View File

@ -27,7 +27,7 @@
#include <set>
#include <iostream>
#include "map_preview.h"
#include <iterator>
#include "leak_dumper.h"
using namespace std;

View File

@ -105,7 +105,7 @@ void* ftpOpenDir(const char* path)
const char* ftpReadDir(void* dirHandle)
{
WIN32_FIND_DATA findData;
readDir_S* p = dirHandle;
readDir_S* p = (readDir_S *)dirHandle;
if(dirHandle == NULL)
return NULL;

View File

@ -75,7 +75,7 @@ Pixmap2D* JPGReader::read(ifstream& is, const string& path, Pixmap2D* ret) const
assert(GlobalStaticFlags::getIsNonGraphicalModeEnabled() == false);
//Read file
is.seekg(0, ios::end);
size_t length = is.tellg();
streampos length = is.tellg();
if (length < 8) {
return NULL;
}

View File

@ -16,6 +16,7 @@
#include <cstdlib>
#include <stdexcept>
#include <set>
#include <iterator>
#include "platform_util.h"
#include "conversion.h"

View File

@ -285,12 +285,12 @@ XmlNode *XmlIoRapid::load(const string &path, std::map<string,string> mapTagRepl
// Determine stream size
xmlFile.seekg(0, ios::end);
size_t size = xmlFile.tellg();
streampos size = xmlFile.tellg();
xmlFile.seekg(0);
// Load data and add terminating 0
vector<char> buffer;
buffer.resize(size + 1);
buffer.resize(size + (streampos)1);
xmlFile.read(&buffer.front(), static_cast<streamsize>(size));
buffer[size] = 0;