Removed useless comments/commented code
This commit is contained in:
parent
fa8f3b1c0f
commit
bfb32b811d
11 changed files with 6 additions and 137 deletions
|
@ -722,7 +722,6 @@ struct CFile
|
||||||
|
|
||||||
/** Try to set the file access to read/write if not already set.
|
/** Try to set the file access to read/write if not already set.
|
||||||
* return true if the file doesn't exist or if the file already have RW access.
|
* return true if the file doesn't exist or if the file already have RW access.
|
||||||
* Work actually only on Windows and returns always true on other platforms.
|
|
||||||
* \return true if RW access is granted
|
* \return true if RW access is granted
|
||||||
*/
|
*/
|
||||||
static bool setRWAccess(const std::string &filename);
|
static bool setRWAccess(const std::string &filename);
|
||||||
|
|
|
@ -26,9 +26,6 @@
|
||||||
#include "nel/misc/file.h"
|
#include "nel/misc/file.h"
|
||||||
#include "nel/misc/hierarchical_timer.h"
|
#include "nel/misc/hierarchical_timer.h"
|
||||||
|
|
||||||
// std.
|
|
||||||
#include <fstream>
|
|
||||||
|
|
||||||
|
|
||||||
using namespace NLMISC;
|
using namespace NLMISC;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
@ -85,8 +82,6 @@ void CLandscapeIGManager::initIG(UScene *scene, const std::string &igDesc, UDriv
|
||||||
|
|
||||||
string igFile = CPath::lookup(igDesc);
|
string igFile = CPath::lookup(igDesc);
|
||||||
|
|
||||||
//ifstream file(igFile.c_str(), ios::in);
|
|
||||||
|
|
||||||
CIFile file;
|
CIFile file;
|
||||||
|
|
||||||
// Shape to add should be empty !
|
// Shape to add should be empty !
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
#include <deque>
|
#include <deque>
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <fstream>
|
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
|
|
@ -210,13 +210,8 @@ void CAsyncFileManager::CFileLoad::run (void)
|
||||||
FILE *f = nlfopen (_FileName, "rb");
|
FILE *f = nlfopen (_FileName, "rb");
|
||||||
if (f != NULL)
|
if (f != NULL)
|
||||||
{
|
{
|
||||||
uint8 *ptr;
|
uint32 filesize=CFile::getFileSize (f);
|
||||||
long filesize=CFile::getFileSize (f);
|
uint8 *ptr = new uint8[filesize];
|
||||||
//fseek (f, 0, SEEK_END);
|
|
||||||
//long filesize = ftell (f);
|
|
||||||
//nlSleep(5);
|
|
||||||
//fseek (f, 0, SEEK_SET);
|
|
||||||
ptr = new uint8[filesize];
|
|
||||||
if (fread (ptr, filesize, 1, f) != 1)
|
if (fread (ptr, filesize, 1, f) != 1)
|
||||||
nlwarning("AFM: Couldn't read '%s'", _FileName.c_str());
|
nlwarning("AFM: Couldn't read '%s'", _FileName.c_str());
|
||||||
fclose (f);
|
fclose (f);
|
||||||
|
@ -256,13 +251,8 @@ void CAsyncFileManager::CMultipleFileLoad::run (void)
|
||||||
FILE *f = nlfopen (_FileNames[i], "rb");
|
FILE *f = nlfopen (_FileNames[i], "rb");
|
||||||
if (f != NULL)
|
if (f != NULL)
|
||||||
{
|
{
|
||||||
uint8 *ptr;
|
uint32 filesize=CFile::getFileSize (f);
|
||||||
long filesize=CFile::getFileSize (f);
|
uint8 *ptr = new uint8[filesize];
|
||||||
//fseek (f, 0, SEEK_END);
|
|
||||||
//long filesize = ftell (f);
|
|
||||||
//nlSleep(5);
|
|
||||||
//fseek (f, 0, SEEK_SET);
|
|
||||||
ptr = new uint8[filesize];
|
|
||||||
if (fread (ptr, filesize, 1, f) != 1)
|
if (fread (ptr, filesize, 1, f) != 1)
|
||||||
nlwarning("AFM: Couldn't read '%s'", _FileNames[i].c_str());
|
nlwarning("AFM: Couldn't read '%s'", _FileNames[i].c_str());
|
||||||
fclose (f);
|
fclose (f);
|
||||||
|
|
|
@ -555,17 +555,10 @@ uint8 CBitmap::readDDS(NLMISC::IStream &f, uint mipMapSkip)
|
||||||
(very) bad rendered with this fix so we have to deactivate it the for moment
|
(very) bad rendered with this fix so we have to deactivate it the for moment
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//#ifdef NL_OS_WINDOWS
|
|
||||||
// if(PixelFormat==DXTC1) //AlphaBitDepth
|
|
||||||
// {
|
|
||||||
// PixelFormat = DXTC1Alpha;
|
|
||||||
// }
|
|
||||||
//#else
|
|
||||||
if(PixelFormat==DXTC1 && _DDSSurfaceDesc[21]>0) //AlphaBitDepth
|
if(PixelFormat==DXTC1 && _DDSSurfaceDesc[21]>0) //AlphaBitDepth
|
||||||
{
|
{
|
||||||
PixelFormat = DXTC1Alpha;
|
PixelFormat = DXTC1Alpha;
|
||||||
}
|
}
|
||||||
//#endif
|
|
||||||
|
|
||||||
if(PixelFormat!= DXTC1 && PixelFormat!= DXTC1Alpha && PixelFormat!= DXTC3 && PixelFormat!= DXTC5)
|
if(PixelFormat!= DXTC1 && PixelFormat!= DXTC1Alpha && PixelFormat!= DXTC3 && PixelFormat!= DXTC5)
|
||||||
{
|
{
|
||||||
|
|
|
@ -290,12 +290,6 @@ void CStdDisplayer::doDisplay ( const CLog::TDisplayInfo& args, const char *mess
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/*OutputDebugString(ss2.str().c_str());
|
|
||||||
OutputDebugString("\n\t\t\t");
|
|
||||||
OutputDebugString("message end: ");
|
|
||||||
OutputDebugString(&message[strlen(message) - 1024]);
|
|
||||||
OutputDebugString("\n");*/
|
|
||||||
|
|
||||||
sint count = 0;
|
sint count = 0;
|
||||||
uint n = (uint)strlen(message);
|
uint n = (uint)strlen(message);
|
||||||
std::string s(&str2.c_str()[0], (str2.size() - n));
|
std::string s(&str2.c_str()[0], (str2.size() - n));
|
||||||
|
@ -702,58 +696,4 @@ void CMsgBoxDisplayer::doDisplay ( const CLog::TDisplayInfo& args, const char *m
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************/
|
|
||||||
/******************* THE FOLLOWING CODE IS COMMENTED OUT *******/
|
|
||||||
/***************************************************************
|
|
||||||
void CStdDisplayer::display (const std::string& str)
|
|
||||||
{
|
|
||||||
// printf("%s", str.c_str ());
|
|
||||||
cout << str;
|
|
||||||
|
|
||||||
#ifdef NL_OS_WINDOWS
|
|
||||||
// display the string in the debugger is the application is started with the debugger
|
|
||||||
if (IsDebuggerPresent ())
|
|
||||||
OutputDebugString(str.c_str ());
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void CFileDisplayer::display (const std::string& str)
|
|
||||||
{
|
|
||||||
if (_FileName.size () == 0) return;
|
|
||||||
|
|
||||||
ofstream ofs (_FileName.c_str (), ios::out | ios::app);
|
|
||||||
if (ofs.is_open ())
|
|
||||||
{
|
|
||||||
ofs << str;
|
|
||||||
ofs.close();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// FILE *fp = fopen (_FileName.c_str (), "a");
|
|
||||||
// if (fp == NULL) return;
|
|
||||||
|
|
||||||
// fprintf (fp, "%s", str.c_str ());
|
|
||||||
|
|
||||||
// fclose (fp);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void CMsgBoxDisplayer::display (const std::string& str)
|
|
||||||
{
|
|
||||||
#ifdef NL_OS_WINDOWS
|
|
||||||
|
|
||||||
CSystemUtils::copyTextToClipboard(str);
|
|
||||||
|
|
||||||
string strf = str;
|
|
||||||
strf += "\n\n(this message was copied in the clipboard)";
|
|
||||||
MessageBox (NULL, strf.c_str (), "", MB_OK | MB_ICONEXCLAMATION);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
**************************************************************************/
|
|
||||||
|
|
||||||
|
|
||||||
} // NLMISC
|
} // NLMISC
|
||||||
|
|
|
@ -2299,9 +2299,6 @@ static bool CopyMoveFile(const std::string &dest, const std::string &src, bool c
|
||||||
std::string sdest = CPath::standardizePath(dest,false);
|
std::string sdest = CPath::standardizePath(dest,false);
|
||||||
std::string ssrc = CPath::standardizePath(src,false);
|
std::string ssrc = CPath::standardizePath(src,false);
|
||||||
|
|
||||||
// return copyFile ? CopyFile(dossrc.c_str(), dosdest.c_str(), failIfExists) != FALSE
|
|
||||||
// : MoveFile(dossrc.c_str(), dosdest.c_str()) != FALSE;
|
|
||||||
|
|
||||||
if (progress) progress->progress(0.f);
|
if (progress) progress->progress(0.f);
|
||||||
if(copyFile)
|
if(copyFile)
|
||||||
{
|
{
|
||||||
|
|
|
@ -600,7 +600,6 @@ sint IService::main (const char *serviceShortName, const char *serviceLongName,
|
||||||
|
|
||||||
ListeningPort = servicePort;
|
ListeningPort = servicePort;
|
||||||
|
|
||||||
// setReportEmailFunction ((void*)sendEmail);
|
|
||||||
// setDefaultEmailParams ("gw.nevrax.com", "", "cado@nevrax.com");
|
// setDefaultEmailParams ("gw.nevrax.com", "", "cado@nevrax.com");
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1857,17 +1857,7 @@ class CAHOpenURL : public IActionHandler
|
||||||
// TODO: for Linux and Mac OS
|
// TODO: for Linux and Mac OS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
if (sParams == "cfg_EditAccountURL")
|
||||||
if (sParams == "cfg_CreateAccountURL")
|
|
||||||
{
|
|
||||||
url = ClientCfg.CreateAccountURL;
|
|
||||||
|
|
||||||
if (!installTag.empty())
|
|
||||||
{
|
|
||||||
url += string("/?from=")+installTag;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else */if (sParams == "cfg_EditAccountURL")
|
|
||||||
{
|
{
|
||||||
url = ClientCfg.EditAccountURL;
|
url = ClientCfg.EditAccountURL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,13 +26,6 @@
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "file_description_container.h"
|
#include "file_description_container.h"
|
||||||
|
|
||||||
#ifdef NL_OS_WINDOWS
|
|
||||||
#include <time.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
//#include <sys/stat.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
//-------------------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------------
|
||||||
// namespaces
|
// namespaces
|
||||||
|
@ -110,23 +103,10 @@ void CFileDescriptionContainer::addFile(const string& fileName, uint32 timeStamp
|
||||||
|
|
||||||
void CFileDescriptionContainer::addFile(const string& fileName)
|
void CFileDescriptionContainer::addFile(const string& fileName)
|
||||||
{
|
{
|
||||||
//#ifdef NL_OS_WINDOWS
|
|
||||||
//
|
|
||||||
// struct _stat buffer;
|
|
||||||
// uint32 result= _stat(fileName.c_str(),&buffer);
|
|
||||||
// if (result==0)
|
|
||||||
// {
|
|
||||||
// addFile(fileName, uint32(buffer.st_mtime), buffer.st_size);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
//#else
|
|
||||||
|
|
||||||
if (CFile::fileExists(fileName))
|
if (CFile::fileExists(fileName))
|
||||||
{
|
{
|
||||||
addFile(fileName,CFile::getFileModificationDate(fileName),CFile::getFileSize(fileName));
|
addFile(fileName,CFile::getFileModificationDate(fileName),CFile::getFileSize(fileName));
|
||||||
}
|
}
|
||||||
|
|
||||||
//#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFileDescriptionContainer::addFileSpec(const string& fileSpec,bool recurse)
|
void CFileDescriptionContainer::addFileSpec(const string& fileSpec,bool recurse)
|
||||||
|
|
|
@ -671,14 +671,6 @@ struct TTypeLimits<uint32>
|
||||||
};
|
};
|
||||||
static uint32 floor(uint32 value) { return value; }
|
static uint32 floor(uint32 value) { return value; }
|
||||||
};
|
};
|
||||||
/*
|
|
||||||
#ifdef NL_OS_WINDOWS
|
|
||||||
template <>
|
|
||||||
struct TTypeLimits<unsigned int> : public TTypeLimits<uint32>
|
|
||||||
{
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
*/
|
|
||||||
template <>
|
template <>
|
||||||
struct TTypeLimits<uint64>
|
struct TTypeLimits<uint64>
|
||||||
{
|
{
|
||||||
|
@ -728,12 +720,7 @@ struct TTypeLimits<sint32>
|
||||||
};
|
};
|
||||||
static sint32 floor(sint32 value) { return value; }
|
static sint32 floor(sint32 value) { return value; }
|
||||||
};
|
};
|
||||||
/*#ifdef NL_OS_WINDOWS
|
|
||||||
template <>
|
|
||||||
struct TTypeLimits<int> : public TTypeLimits<sint32>
|
|
||||||
{
|
|
||||||
};
|
|
||||||
#endif*/
|
|
||||||
template <>
|
template <>
|
||||||
struct TTypeLimits<sint64>
|
struct TTypeLimits<sint64>
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue