updated for vc++ 2012 x64 compile
This commit is contained in:
parent
651edc6f1c
commit
8b5e681ae5
|
@ -164,7 +164,7 @@
|
|||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_WINDOWS;XML_LIBRARY;USE_PCH=1;_CRT_SECURE_NO_WARNINGS;USE_STREFLOP;STREFLOP_SSE;LIBM_COMPILING_FLT32;CURL_STATICLIB;UNICODE;XERCES_STATIC_LIBRARY;GLEW_STATIC;USE_FREETYPEGL;STATICLIB;USE_FTGL;FTGL_LIBRARY_STATIC;ZLIB_WINAPI;HAVE_GOOGLE_BREAKPAD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_WINDOWS;XML_LIBRARY;USE_PCH=1;_CRT_SECURE_NO_WARNINGS;USE_STREFLOP_XXX;STREFLOP_SSE_XXX;LIBM_COMPILING_FLT32_XXX;CURL_STATICLIB;UNICODE;XERCES_STATIC_LIBRARY;GLEW_STATIC;USE_FREETYPEGL;STATICLIB;USE_FTGL;FTGL_LIBRARY_STATIC;ZLIB_WINAPI;HAVE_GOOGLE_BREAKPAD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<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/util;../../../source/shared_lib/include/lua;../../../source/shared_lib/include/xml;../../../source/shared_lib/include/xml/rapidxml;../../../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/windows_deps_2012/include;../../../source/windows_deps_2012/xerces-c-3.1.1/src;../../../source/windows_deps_2012/SDL-1.2.15/include;../../../source/shared_lib/include/platform/sdl;../../../source/shared_lib/include/sound/openal;../../../source/windows_deps_2012/openal-soft-1.14/include;../../../source/shared_lib/include/platform/posix;../../../source/shared_lib/include/platform/common;../../../source/windows_deps_2012/curl-7.21.3/include;../../../source/shared_lib/include/map;../../../source/windows_deps_2012/libircclient/include;../../../source/windows_deps_2012/glew-1.7.0/include;../../../source/windows_deps_2012/cppunit/include</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FloatingPointModel>Fast</FloatingPointModel>
|
||||
|
|
|
@ -1659,30 +1659,30 @@ void Game::setupPopupMenus(bool checkClientAdminOverrideOnly) {
|
|||
//PopupMenu popupMenu;
|
||||
std::vector<string> menuItems;
|
||||
menuItems.push_back(lang.getString("ExitGameMenu?"));
|
||||
exitGamePopupMenuIndex = menuItems.size()-1;
|
||||
exitGamePopupMenuIndex = (int)menuItems.size()-1;
|
||||
|
||||
if((gameSettings.getFlagTypes1() & ft1_allow_team_switching) == ft1_allow_team_switching &&
|
||||
world.getThisFaction() != NULL && world.getThisFaction()->getPersonalityType() != fpt_Observer) {
|
||||
menuItems.push_back(lang.getString("JoinOtherTeam"));
|
||||
joinTeamPopupMenuIndex = menuItems.size()-1;
|
||||
joinTeamPopupMenuIndex = (int)menuItems.size()-1;
|
||||
}
|
||||
|
||||
if(allowAdminMenuItems == true){
|
||||
menuItems.push_back(lang.getString("PauseResumeGame"));
|
||||
pauseGamePopupMenuIndex= menuItems.size() - 1;
|
||||
pauseGamePopupMenuIndex= (int)menuItems.size() - 1;
|
||||
|
||||
if(gameSettings.isNetworkGame() == false){
|
||||
menuItems.push_back(lang.getString("SaveGame"));
|
||||
saveGamePopupMenuIndex= menuItems.size() - 1;
|
||||
saveGamePopupMenuIndex= (int)menuItems.size() - 1;
|
||||
}
|
||||
|
||||
if(gameSettings.isNetworkGame() == true){
|
||||
menuItems.push_back(lang.getString("DisconnectNetorkPlayer"));
|
||||
disconnectPlayerPopupMenuIndex= menuItems.size() - 1;
|
||||
disconnectPlayerPopupMenuIndex= (int)menuItems.size() - 1;
|
||||
}
|
||||
}
|
||||
menuItems.push_back(lang.getString("Keyboardsetup"));
|
||||
keyboardSetupPopupMenuIndex = menuItems.size()-1;
|
||||
keyboardSetupPopupMenuIndex = (int)menuItems.size()-1;
|
||||
|
||||
menuItems.push_back(lang.getString("Cancel"));
|
||||
|
||||
|
@ -2709,7 +2709,7 @@ void Game::update() {
|
|||
}
|
||||
|
||||
if(showPerfStats && chronoPerf.getMillis() >= 50) {
|
||||
for(unsigned int x = 0; x < perfList.size(); ++x) {
|
||||
for(unsigned int x = 0; x < (unsigned int)perfList.size(); ++x) {
|
||||
printf("%s",perfList[x].c_str());
|
||||
}
|
||||
}
|
||||
|
@ -2883,7 +2883,7 @@ void Game::updateNetworkMarkedCells() {
|
|||
gameNetworkInterface->getMarkedCellList(false).empty() == false) {
|
||||
|
||||
std::vector<MarkedCell> chatList = gameNetworkInterface->getMarkedCellList(true);
|
||||
for(int idx = 0; idx < chatList.size(); idx++) {
|
||||
for(int idx = 0; idx < (int)chatList.size(); idx++) {
|
||||
MarkedCell mc = chatList[idx];
|
||||
if(mc.getFactionIndex() >= 0) {
|
||||
mc.setFaction((const Faction *)world.getFaction(mc.getFactionIndex()));
|
||||
|
@ -2912,7 +2912,7 @@ void Game::updateNetworkUnMarkedCells() {
|
|||
//Lang &lang= Lang::getInstance();
|
||||
|
||||
std::vector<UnMarkedCell> chatList = gameNetworkInterface->getUnMarkedCellList(true);
|
||||
for(int idx = 0; idx < chatList.size(); idx++) {
|
||||
for(int idx = 0; idx < (int)chatList.size(); idx++) {
|
||||
UnMarkedCell mc = chatList[idx];
|
||||
mc.setFaction((const Faction *)world.getFaction(mc.getFactionIndex()));
|
||||
|
||||
|
@ -2936,7 +2936,7 @@ void Game::updateNetworkHighligtedCells() {
|
|||
GameNetworkInterface *gameNetworkInterface= NetworkManager::getInstance().getGameNetworkInterface();
|
||||
|
||||
//update the current entries
|
||||
for(int idx = highlightedCells.size()-1; idx >= 0; idx--) {
|
||||
for(int idx = (int)highlightedCells.size()-1; idx >= 0; idx--) {
|
||||
MarkedCell *mc = &highlightedCells[idx];
|
||||
mc->decrementAliveCount();
|
||||
if(mc->getAliveCount() < 0) {
|
||||
|
@ -2948,7 +2948,7 @@ void Game::updateNetworkHighligtedCells() {
|
|||
gameNetworkInterface->getHighlightedCellList(false).empty() == false) {
|
||||
//Lang &lang= Lang::getInstance();
|
||||
std::vector<MarkedCell> highlighList = gameNetworkInterface->getHighlightedCellList(true);
|
||||
for(int idx = 0; idx < highlighList.size(); idx++) {
|
||||
for(int idx = 0; idx < (int)highlighList.size(); idx++) {
|
||||
MarkedCell mc = highlighList[idx]; // I want a copy here
|
||||
if(mc.getFactionIndex() >= 0) {
|
||||
mc.setFaction((const Faction *)world.getFaction(mc.getFactionIndex())); // set faction pointer
|
||||
|
@ -2967,7 +2967,7 @@ void Game::updateNetworkHighligtedCells() {
|
|||
|
||||
void Game::addOrReplaceInHighlightedCells(MarkedCell mc){
|
||||
if(mc.getFactionIndex() >= 0) {
|
||||
for(int i = highlightedCells.size()-1; i >= 0; i--) {
|
||||
for(int i = (int)highlightedCells.size()-1; i >= 0; i--) {
|
||||
MarkedCell *currentMc = &highlightedCells[i];
|
||||
if(currentMc->getFactionIndex() == mc.getFactionIndex()) {
|
||||
highlightedCells.erase(highlightedCells.begin()+i);
|
||||
|
@ -3038,7 +3038,7 @@ void Game::ReplaceDisconnectedNetworkPlayersWithAI(bool isNetworkGame, NetworkRo
|
|||
}
|
||||
|
||||
const vector<string> languageList = this->gameSettings.getUniqueNetworkPlayerLanguages();
|
||||
for(unsigned int j = 0; j < languageList.size(); ++j) {
|
||||
for(unsigned int j = 0; j < (unsigned int)languageList.size(); ++j) {
|
||||
if(isPlayerObserver == false) {
|
||||
string msg = "Player #%d [%s] has disconnected, switching player to AI mode!";
|
||||
if(lang.hasString("GameSwitchPlayerToAI",languageList[j],true)) {
|
||||
|
@ -3630,16 +3630,16 @@ void Game::mouseDownLeft(int x, int y) {
|
|||
|
||||
menuItems.push_back(szBuf);
|
||||
|
||||
switchTeamIndexMap[menuItems.size()-1] = faction->getTeam();
|
||||
switchTeamIndexMap[(int)menuItems.size()-1] = faction->getTeam();
|
||||
}
|
||||
}
|
||||
|
||||
if(uniqueTeamNumbersUsed.size() < 8) {
|
||||
if((int)uniqueTeamNumbersUsed.size() < 8) {
|
||||
menuItems.push_back(lang.getString("CreateNewTeam"));
|
||||
switchTeamIndexMap[menuItems.size()-1] = CREATE_NEW_TEAM;
|
||||
switchTeamIndexMap[(int)menuItems.size()-1] = CREATE_NEW_TEAM;
|
||||
}
|
||||
menuItems.push_back(lang.getString("Cancel"));
|
||||
switchTeamIndexMap[menuItems.size()-1] = CANCEL_SWITCH_TEAM;
|
||||
switchTeamIndexMap[(int)menuItems.size()-1] = CANCEL_SWITCH_TEAM;
|
||||
|
||||
popupMenuSwitchTeams.setW(100);
|
||||
popupMenuSwitchTeams.setH(100);
|
||||
|
@ -3692,12 +3692,12 @@ void Game::mouseDownLeft(int x, int y) {
|
|||
menuItems.push_back(szBuf);
|
||||
|
||||
//disconnectPlayerIndexMap[menuItems.size()-1] = faction->getStartLocationIndex();
|
||||
disconnectPlayerIndexMap[menuItems.size()-1] = faction->getIndex();
|
||||
disconnectPlayerIndexMap[(int)menuItems.size()-1] = faction->getIndex();
|
||||
}
|
||||
}
|
||||
|
||||
menuItems.push_back(lang.getString("Cancel"));
|
||||
disconnectPlayerIndexMap[menuItems.size()-1] = CANCEL_DISCONNECT_PLAYER;
|
||||
disconnectPlayerIndexMap[(int)menuItems.size()-1] = CANCEL_DISCONNECT_PLAYER;
|
||||
|
||||
popupMenuDisconnectPlayer.setW(100);
|
||||
popupMenuDisconnectPlayer.setH(100);
|
||||
|
@ -3840,7 +3840,7 @@ void Game::mouseDownLeft(int x, int y) {
|
|||
if(gameNetworkInterface != NULL) {
|
||||
Lang &lang= Lang::getInstance();
|
||||
const vector<string> languageList = settings->getUniqueNetworkPlayerLanguages();
|
||||
for(unsigned int i = 0; i < languageList.size(); ++i) {
|
||||
for(unsigned int i = 0; i < (unsigned int)languageList.size(); ++i) {
|
||||
char szMsg[8096]="";
|
||||
if(lang.hasString("DisconnectNetorkPlayerIndexConfirmed",languageList[i]) == true) {
|
||||
snprintf(szMsg,8096,lang.getString("DisconnectNetorkPlayerIndexConfirmed",languageList[i]).c_str(),factionIndex+1,settings->getNetworkPlayerName(factionIndex).c_str());
|
||||
|
@ -5251,10 +5251,10 @@ string Game::getDebugStats(std::map<int,string> &factionDebugInfo) {
|
|||
if(this->masterserverMode == false) {
|
||||
Renderer &renderer= Renderer::getInstance();
|
||||
VisibleQuadContainerCache &qCache =renderer.getQuadCache();
|
||||
int visibleUnitCount = qCache.visibleQuadUnitList.size();
|
||||
int visibleUnitCount = (int)qCache.visibleQuadUnitList.size();
|
||||
str+= "Visible unit count: " + intToStr(visibleUnitCount) + " total: " + intToStr(totalUnitcount) + "\n";
|
||||
|
||||
int visibleObjectCount = qCache.visibleObjectList.size();
|
||||
int visibleObjectCount = (int)qCache.visibleObjectList.size();
|
||||
str+= "Visible object count: " + intToStr(visibleObjectCount) +"\n";
|
||||
}
|
||||
else {
|
||||
|
@ -5412,7 +5412,7 @@ void Game::render2d() {
|
|||
Tokenize(str,lineTokens,"\n");
|
||||
int fontHeightNormal = (Renderer::renderText3DEnabled == true ? coreData.getMenuFontNormal3D()->getMetrics()->getHeight("W") : coreData.getMenuFontNormal()->getMetrics()->getHeight("W"));
|
||||
int fontHeightBig = (Renderer::renderText3DEnabled == true ? coreData.getMenuFontBig3D()->getMetrics()->getHeight("W") : coreData.getMenuFontBig()->getMetrics()->getHeight("W"));
|
||||
int playerPosY = lineTokens.size() * fontHeightNormal;
|
||||
int playerPosY = (int)lineTokens.size() * fontHeightNormal;
|
||||
|
||||
//printf("lineTokens.size() = %d\n",lineTokens.size());
|
||||
|
||||
|
|
|
@ -3758,7 +3758,7 @@ template<typename T> void _loadVBO(GLuint &vbo,std::vector<T> buf,int target=GL_
|
|||
}
|
||||
|
||||
void Renderer::MapRenderer::Layer::load_vbos(bool vboEnabled) {
|
||||
indexCount = indices.size();
|
||||
indexCount = (int)indices.size();
|
||||
if(vboEnabled) {
|
||||
_loadVBO(vbo_vertices,vertices);
|
||||
_loadVBO(vbo_normals,normals);
|
||||
|
@ -3833,7 +3833,7 @@ void Renderer::MapRenderer::loadVisibleLayers(float coordStep,VisibleQuadContain
|
|||
int index[4];
|
||||
int loopIndexes[4] = { 2,0,3,1 };
|
||||
for(int i=0; i < 4; i++) {
|
||||
index[i] = layer->vertices.size();
|
||||
index[i] = (int)layer->vertices.size();
|
||||
SurfaceCell *corner = tc[loopIndexes[i]];
|
||||
|
||||
layer->vertices.push_back(corner->getVertex());
|
||||
|
@ -3904,7 +3904,7 @@ void Renderer::MapRenderer::load(float coordStep) {
|
|||
int index[4];
|
||||
int loopIndexes[4] = { 2,0,3,1 };
|
||||
for(int i=0; i < 4; i++) {
|
||||
index[i] = layer->vertices.size();
|
||||
index[i] = (int)layer->vertices.size();
|
||||
SurfaceCell *corner = tc[loopIndexes[i]];
|
||||
layer->vertices.push_back(corner->getVertex());
|
||||
layer->normals.push_back(corner->getNormal());
|
||||
|
@ -3921,7 +3921,7 @@ void Renderer::MapRenderer::load(float coordStep) {
|
|||
layer->surfTexCoords.push_back(tc[0]->getSurfTexCoord()+Vec2f(coordStep,coordStep));
|
||||
layer->surfTexCoords.push_back(tc[0]->getSurfTexCoord()+Vec2f(coordStep,0));
|
||||
|
||||
layer->cellToIndicesMap[Vec2i(x,y)] = layer->indices.size();
|
||||
layer->cellToIndicesMap[Vec2i(x,y)] = (int)layer->indices.size();
|
||||
|
||||
// and make two triangles (no strip, we may be disjoint)
|
||||
layer->indices.push_back(index[0]);
|
||||
|
@ -4449,7 +4449,7 @@ void Renderer::renderSurface(const int renderFps) {
|
|||
newData.textureHandle = currTex;
|
||||
surface->push_back(newData);
|
||||
|
||||
surfaceDataIndex = surface->size() - 1;
|
||||
surfaceDataIndex = (int)surface->size() - 1;
|
||||
}
|
||||
|
||||
lastSurfaceDataIndex = surfaceDataIndex;
|
||||
|
@ -4606,7 +4606,7 @@ void Renderer::renderObjects(const int renderFps) {
|
|||
// visibleIndex < qCache.visibleObjectList.size(); ++visibleIndex) {
|
||||
// render from last to first object so animated objects which are on bottom of screen are
|
||||
// rendered first which looks better for limited number of animated tileset objects
|
||||
for(int visibleIndex = qCache.visibleObjectList.size()-1;
|
||||
for(int visibleIndex = (int)qCache.visibleObjectList.size()-1;
|
||||
visibleIndex >= 0 ; --visibleIndex) {
|
||||
Object *o = qCache.visibleObjectList[visibleIndex];
|
||||
|
||||
|
@ -7312,7 +7312,7 @@ void Renderer::saveScreen(const string &path,int w, int h) {
|
|||
|
||||
unsigned int Renderer::getSaveScreenQueueSize() {
|
||||
MutexSafeWrapper safeMutex(&saveScreenShotThreadAccessor,string(extractFileFromDirectoryPath(__FILE__).c_str()) + "_" + intToStr(__LINE__));
|
||||
int queueSize = saveScreenQueue.size();
|
||||
int queueSize = (int)saveScreenQueue.size();
|
||||
safeMutex.ReleaseLock();
|
||||
|
||||
return queueSize;
|
||||
|
|
|
@ -279,7 +279,7 @@ bool compressFileToZIPFile(string inFile, string outFile, int compressionLevel)
|
|||
argv.push_back(inFile.c_str());
|
||||
argv.push_back(outFile.c_str());
|
||||
|
||||
int result = zipfile_tool(argv.size(), &argv[0]);
|
||||
int result = zipfile_tool((int)argv.size(), &argv[0]);
|
||||
return(result == EXIT_SUCCESS ? true : false);
|
||||
}
|
||||
|
||||
|
@ -290,7 +290,7 @@ bool extractFileFromZIPFile(string inFile, string outFile) {
|
|||
argv.push_back(inFile.c_str());
|
||||
argv.push_back(outFile.c_str());
|
||||
|
||||
int result = zipfile_tool(argv.size(), &argv[0]);
|
||||
int result = zipfile_tool((int)argv.size(), &argv[0]);
|
||||
return(result == EXIT_SUCCESS ? true : false);
|
||||
}
|
||||
|
||||
|
|
|
@ -320,7 +320,7 @@ void Font::setSize(int size) {
|
|||
void Font::bidi_cvt(string &str_) {
|
||||
#ifdef HAVE_FRIBIDI
|
||||
char *c_str = const_cast<char *>(str_.c_str()); // fribidi forgot const...
|
||||
FriBidiStrIndex len = str_.length();
|
||||
FriBidiStrIndex len = (int)str_.length();
|
||||
FriBidiChar *bidi_logical = new FriBidiChar[len + 2];
|
||||
FriBidiChar *bidi_visual = new FriBidiChar[len + 2];
|
||||
char *utf8str = new char[4*len + 1]; //assume worst case here (all 4 Byte characters)
|
||||
|
|
|
@ -1400,7 +1400,7 @@ public:
|
|||
return indexValue;
|
||||
}
|
||||
int size() {
|
||||
return meshes.size();
|
||||
return (int)meshes.size();
|
||||
}
|
||||
std::vector<Mesh *> get() {
|
||||
return meshes;
|
||||
|
@ -1719,7 +1719,7 @@ void Model::autoJoinMeshFrames() {
|
|||
|
||||
delete [] meshes;
|
||||
meshes = joinedMeshList;
|
||||
meshCount = joinedMeshes.size();
|
||||
meshCount = (uint32)joinedMeshes.size();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1817,7 +1817,7 @@ void PixelBufferWrapper::end() {
|
|||
void PixelBufferWrapper::cleanup() {
|
||||
if(PixelBufferWrapper::isPBOEnabled == true) {
|
||||
if(pboIds.empty() == false) {
|
||||
glDeleteBuffersARB(pboIds.size(), &pboIds[0]);
|
||||
glDeleteBuffersARB((int)pboIds.size(), &pboIds[0]);
|
||||
pboIds.clear();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -790,7 +790,7 @@ GameParticleSystem::Primitive GameParticleSystem::strToPrimitive(const string &s
|
|||
}
|
||||
|
||||
int GameParticleSystem::getChildCount(){
|
||||
return children.size();
|
||||
return (int)children.size();
|
||||
}
|
||||
|
||||
ParticleSystem* GameParticleSystem::getChild(int i){
|
||||
|
@ -2458,7 +2458,7 @@ void ParticleManager::cleanupParticleSystems(ParticleSystem *ps) {
|
|||
|
||||
void ParticleManager::cleanupParticleSystems(vector<ParticleSystem *> &cleanupParticleSystemsList){
|
||||
if(cleanupParticleSystemsList.empty() == false) {
|
||||
for(int i= cleanupParticleSystemsList.size()-1; i >= 0; i--) {
|
||||
for(int i= (int)cleanupParticleSystemsList.size()-1; i >= 0; i--) {
|
||||
ParticleSystem *ps= cleanupParticleSystemsList[i];
|
||||
cleanupParticleSystems(ps);
|
||||
}
|
||||
|
@ -2469,7 +2469,7 @@ void ParticleManager::cleanupParticleSystems(vector<ParticleSystem *> &cleanupPa
|
|||
|
||||
void ParticleManager::cleanupUnitParticleSystems(vector<UnitParticleSystem *> &cleanupParticleSystemsList){
|
||||
if(cleanupParticleSystemsList.empty() == false) {
|
||||
for(int i= cleanupParticleSystemsList.size()-1; i >= 0; i--) {
|
||||
for(int i= (int)cleanupParticleSystemsList.size()-1; i >= 0; i--) {
|
||||
ParticleSystem *ps= cleanupParticleSystemsList[i];
|
||||
cleanupParticleSystems(ps);
|
||||
}
|
||||
|
|
|
@ -461,7 +461,7 @@ void removeFolder(const string &path) {
|
|||
// First delete files
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] DELETE FILES\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
|
||||
for(int i = results.size() -1; i >= 0; --i) {
|
||||
for(int i = (int)results.size() -1; i >= 0; --i) {
|
||||
string item = results[i];
|
||||
|
||||
//if(item.find(".svn") != string::npos) {
|
||||
|
@ -476,7 +476,7 @@ void removeFolder(const string &path) {
|
|||
// Now delete folders
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] DELETE FOLDERS\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
|
||||
for(int i = results.size() -1; i >= 0; --i) {
|
||||
for(int i = (int)results.size() -1; i >= 0; --i) {
|
||||
string item = results[i];
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] item [%s] isdir(item.c_str()) = %d\n",__FILE__,__FUNCTION__,__LINE__,item.c_str(), isdir(item.c_str()));
|
||||
if(isdir(item.c_str()) == true) {
|
||||
|
@ -587,7 +587,7 @@ void updatePathClimbingParts(string &path) {
|
|||
path.erase(pos,1);
|
||||
}
|
||||
|
||||
for(int x = pos; x >= 0; --x) {
|
||||
for(int x = (int)pos; x >= 0; --x) {
|
||||
//printf("x [%d][%c] pos [%ld][%c] [%s]\n",x,path[x],(long int)pos,path[pos],path.substr(0,x+1).c_str());
|
||||
|
||||
if((path[x] == '/' || path[x] == '\\') && x != pos) {
|
||||
|
@ -1443,7 +1443,7 @@ string extractLastDirectoryFromPath(string Path) {
|
|||
result = Path.erase( 0, lastDirectory + 1);
|
||||
}
|
||||
else {
|
||||
for(int i = lastDirectory-1; i >= 0; --i) {
|
||||
for(int i = (int)lastDirectory-1; i >= 0; --i) {
|
||||
if((Path[i] == '/' || Path[i] == '\\') && i > 0) {
|
||||
result = Path.erase( 0, i);
|
||||
break;
|
||||
|
|
|
@ -327,7 +327,7 @@ vector<Texture2D *> FileCRCPreCacheThread::getPendingTextureList(int maxTextures
|
|||
static string mutexOwnerId = CODE_AT_LINE;
|
||||
MutexSafeWrapper safeMutex(&mutexPendingTextureList,mutexOwnerId);
|
||||
mutexPendingTextureList.setOwnerId(mutexOwnerId);
|
||||
unsigned int listCount = pendingTextureList.size();
|
||||
unsigned int listCount = (unsigned int)pendingTextureList.size();
|
||||
if(listCount > 0) {
|
||||
if(maxTexturesToGet >= 0) {
|
||||
listCount = maxTexturesToGet;
|
||||
|
|
|
@ -737,7 +737,7 @@ void MasterSlaveThreadController::init(std::vector<SlaveThreadControllerInterfac
|
|||
static string masterSlaveOwnerId = string(__FILE__) + string("_MasterSlaveThreadController");
|
||||
this->mutex = new Mutex(masterSlaveOwnerId);
|
||||
this->slaveTriggerSem = new Semaphore(0);
|
||||
this->slaveTriggerCounter = newSlaveThreadList.size() + triggerBaseCount;
|
||||
this->slaveTriggerCounter = (int)newSlaveThreadList.size() + triggerBaseCount;
|
||||
setSlaves(newSlaveThreadList);
|
||||
}
|
||||
|
||||
|
@ -787,7 +787,7 @@ void MasterSlaveThreadController::setSlaves(std::vector<SlaveThreadControllerInt
|
|||
void MasterSlaveThreadController::signalSlaves(void *userdata) {
|
||||
if(debugMasterSlaveThreadController) printf("In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
|
||||
slaveTriggerCounter = this->slaveThreadList.size() + triggerBaseCount;
|
||||
slaveTriggerCounter = (int)this->slaveThreadList.size() + triggerBaseCount;
|
||||
|
||||
if(debugMasterSlaveThreadController) printf("In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
|
||||
|
|
|
@ -266,7 +266,7 @@ int glob( char const *pattern
|
|||
|
||||
//cch = lstrlenW(find_data.cFileName);
|
||||
string sFileName = utf8_encode(find_data.cFileName);
|
||||
cch = sFileName.length();
|
||||
cch = (int)sFileName.length();
|
||||
if(NULL != file_part)
|
||||
{
|
||||
cch += (int)(file_part - effectivePattern);
|
||||
|
|
|
@ -99,7 +99,7 @@ namespace Shared { namespace Util {
|
|||
|
||||
char* ConvertFromUTF8(const char* str) {
|
||||
const unsigned char *in = reinterpret_cast<const unsigned char*>(str);
|
||||
int len = strlen(str);
|
||||
int len = (int)strlen(str);
|
||||
char *out = new char[len*8];
|
||||
memset(out,0,len*8);
|
||||
int outc;
|
||||
|
@ -280,7 +280,7 @@ namespace Shared { namespace Util {
|
|||
if(p.length() > 0) {
|
||||
//printf("In [%s::%s] Line: %d\n",__FILE__,__FUNCTION__,__LINE__); fflush(stdout);
|
||||
|
||||
int bufSize = p.length()*4;
|
||||
int bufSize = (int)p.length()*4;
|
||||
char *szBuf = new char[bufSize];
|
||||
memset(szBuf,0,bufSize);
|
||||
strcpy(szBuf,p.c_str());
|
||||
|
|
|
@ -720,7 +720,7 @@ bool XmlNode::hasAttribute(const string &name) const {
|
|||
|
||||
int XmlNode::clearChild(const string &childName) {
|
||||
int clearChildCount = 0;
|
||||
for(int i = children.size()-1; i >= 0; --i) {
|
||||
for(int i = (int)children.size()-1; i >= 0; --i) {
|
||||
if(children[i]->getName() == childName) {
|
||||
delete children[i];
|
||||
children.erase(children.begin()+i);
|
||||
|
|
Loading…
Reference in New Issue