mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-24 18:08:44 +00:00
Removed useless comments/commented code
--HG-- branch : develop
This commit is contained in:
parent
6d21e22905
commit
9370e93dd6
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.
|
||||
* 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
|
||||
*/
|
||||
static bool setRWAccess(const std::string &filename);
|
||||
|
|
|
@ -26,9 +26,6 @@
|
|||
#include "nel/misc/file.h"
|
||||
#include "nel/misc/hierarchical_timer.h"
|
||||
|
||||
// std.
|
||||
#include <fstream>
|
||||
|
||||
|
||||
using namespace NLMISC;
|
||||
using namespace std;
|
||||
|
@ -85,8 +82,6 @@ void CLandscapeIGManager::initIG(UScene *scene, const std::string &igDesc, UDriv
|
|||
|
||||
string igFile = CPath::lookup(igDesc);
|
||||
|
||||
//ifstream file(igFile.c_str(), ios::in);
|
||||
|
||||
CIFile file;
|
||||
|
||||
// Shape to add should be empty !
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#include <ctime>
|
||||
#include <deque>
|
||||
#include <exception>
|
||||
#include <fstream>
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
#include <limits>
|
||||
|
|
|
@ -210,13 +210,8 @@ void CAsyncFileManager::CFileLoad::run (void)
|
|||
FILE *f = nlfopen (_FileName, "rb");
|
||||
if (f != NULL)
|
||||
{
|
||||
uint8 *ptr;
|
||||
long filesize=CFile::getFileSize (f);
|
||||
//fseek (f, 0, SEEK_END);
|
||||
//long filesize = ftell (f);
|
||||
//nlSleep(5);
|
||||
//fseek (f, 0, SEEK_SET);
|
||||
ptr = new uint8[filesize];
|
||||
uint32 filesize=CFile::getFileSize (f);
|
||||
uint8 *ptr = new uint8[filesize];
|
||||
if (fread (ptr, filesize, 1, f) != 1)
|
||||
nlwarning("AFM: Couldn't read '%s'", _FileName.c_str());
|
||||
fclose (f);
|
||||
|
@ -256,13 +251,8 @@ void CAsyncFileManager::CMultipleFileLoad::run (void)
|
|||
FILE *f = nlfopen (_FileNames[i], "rb");
|
||||
if (f != NULL)
|
||||
{
|
||||
uint8 *ptr;
|
||||
long filesize=CFile::getFileSize (f);
|
||||
//fseek (f, 0, SEEK_END);
|
||||
//long filesize = ftell (f);
|
||||
//nlSleep(5);
|
||||
//fseek (f, 0, SEEK_SET);
|
||||
ptr = new uint8[filesize];
|
||||
uint32 filesize=CFile::getFileSize (f);
|
||||
uint8 *ptr = new uint8[filesize];
|
||||
if (fread (ptr, filesize, 1, f) != 1)
|
||||
nlwarning("AFM: Couldn't read '%s'", _FileNames[i].c_str());
|
||||
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
|
||||
*/
|
||||
|
||||
//#ifdef NL_OS_WINDOWS
|
||||
// if(PixelFormat==DXTC1) //AlphaBitDepth
|
||||
// {
|
||||
// PixelFormat = DXTC1Alpha;
|
||||
// }
|
||||
//#else
|
||||
if(PixelFormat==DXTC1 && _DDSSurfaceDesc[21]>0) //AlphaBitDepth
|
||||
{
|
||||
PixelFormat = DXTC1Alpha;
|
||||
}
|
||||
//#endif
|
||||
|
||||
if(PixelFormat!= DXTC1 && PixelFormat!= DXTC1Alpha && PixelFormat!= DXTC3 && PixelFormat!= DXTC5)
|
||||
{
|
||||
|
|
|
@ -290,12 +290,6 @@ void CStdDisplayer::doDisplay ( const CLog::TDisplayInfo& args, const char *mess
|
|||
}
|
||||
else
|
||||
{
|
||||
/*OutputDebugString(ss2.str().c_str());
|
||||
OutputDebugString("\n\t\t\t");
|
||||
OutputDebugString("message end: ");
|
||||
OutputDebugString(&message[strlen(message) - 1024]);
|
||||
OutputDebugString("\n");*/
|
||||
|
||||
sint count = 0;
|
||||
uint n = (uint)strlen(message);
|
||||
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
|
||||
|
|
|
@ -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 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(copyFile)
|
||||
{
|
||||
|
|
|
@ -600,7 +600,6 @@ sint IService::main (const char *serviceShortName, const char *serviceLongName,
|
|||
|
||||
ListeningPort = servicePort;
|
||||
|
||||
// setReportEmailFunction ((void*)sendEmail);
|
||||
// setDefaultEmailParams ("gw.nevrax.com", "", "cado@nevrax.com");
|
||||
|
||||
|
||||
|
|
|
@ -1857,17 +1857,7 @@ class CAHOpenURL : public IActionHandler
|
|||
// TODO: for Linux and Mac OS
|
||||
#endif
|
||||
|
||||
/*
|
||||
if (sParams == "cfg_CreateAccountURL")
|
||||
{
|
||||
url = ClientCfg.CreateAccountURL;
|
||||
|
||||
if (!installTag.empty())
|
||||
{
|
||||
url += string("/?from=")+installTag;
|
||||
}
|
||||
}
|
||||
else */if (sParams == "cfg_EditAccountURL")
|
||||
if (sParams == "cfg_EditAccountURL")
|
||||
{
|
||||
url = ClientCfg.EditAccountURL;
|
||||
}
|
||||
|
|
|
@ -26,13 +26,6 @@
|
|||
#include "utils.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
|
||||
|
@ -110,23 +103,10 @@ void CFileDescriptionContainer::addFile(const string& fileName, uint32 timeStamp
|
|||
|
||||
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))
|
||||
{
|
||||
addFile(fileName,CFile::getFileModificationDate(fileName),CFile::getFileSize(fileName));
|
||||
}
|
||||
|
||||
//#endif
|
||||
}
|
||||
|
||||
void CFileDescriptionContainer::addFileSpec(const string& fileSpec,bool recurse)
|
||||
|
|
|
@ -671,14 +671,6 @@ struct TTypeLimits<uint32>
|
|||
};
|
||||
static uint32 floor(uint32 value) { return value; }
|
||||
};
|
||||
/*
|
||||
#ifdef NL_OS_WINDOWS
|
||||
template <>
|
||||
struct TTypeLimits<unsigned int> : public TTypeLimits<uint32>
|
||||
{
|
||||
};
|
||||
#endif
|
||||
*/
|
||||
template <>
|
||||
struct TTypeLimits<uint64>
|
||||
{
|
||||
|
@ -728,12 +720,7 @@ struct TTypeLimits<sint32>
|
|||
};
|
||||
static sint32 floor(sint32 value) { return value; }
|
||||
};
|
||||
/*#ifdef NL_OS_WINDOWS
|
||||
template <>
|
||||
struct TTypeLimits<int> : public TTypeLimits<sint32>
|
||||
{
|
||||
};
|
||||
#endif*/
|
||||
|
||||
template <>
|
||||
struct TTypeLimits<sint64>
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue