mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-12-27 19:10:52 +00:00
Fixed: Some warnings
This commit is contained in:
parent
58918eed85
commit
2becb762f8
23 changed files with 30 additions and 34 deletions
|
@ -885,7 +885,7 @@ bool CVPParser::parseInstruction(CVPInstruction &instr, std::string &errorOutput
|
|||
}
|
||||
|
||||
// it is not allowed to write to an adress register except for ARL
|
||||
if (instrStr != 'ARL ')
|
||||
if (instrStr != NELID("ARL"))
|
||||
{
|
||||
if (instr.Dest.Type == CVPOperand::AddressRegister)
|
||||
{
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
#include "stdpacs.h"
|
||||
#include "nel/misc/i_xml.h"
|
||||
#include "nel/misc/stream.h"
|
||||
#include "nel/pacs/primitive_block.h"
|
||||
|
||||
|
||||
|
|
|
@ -253,10 +253,7 @@
|
|||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
<zorder>horizontalLayoutWidget</zorder>
|
||||
<zorder>dataDirLabel</zorder>
|
||||
<zorder>horizontalLayoutWidget</zorder>
|
||||
<zorder></zorder>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
|
|
@ -50,8 +50,8 @@ void CSchemeManager::getSchemes(const std::string &type, std::vector<TSchemeInfo
|
|||
void CSchemeManager::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||
{
|
||||
|
||||
f.serialCheck((uint32) '_GNM');
|
||||
f.serialCheck((uint32) 'MHCS');
|
||||
f.serialCheck(NELID("_GNM"));
|
||||
f.serialCheck(NELID("MHCS"));
|
||||
f.serialVersion(1);
|
||||
if (!f.isReading())
|
||||
{
|
||||
|
|
|
@ -42,15 +42,15 @@ static void compressMipMap(uint8 *pixSrc, sint width, sint height, vector<uint8
|
|||
case DXT1:
|
||||
case DXT1A:
|
||||
flags |= squish::kDxt1;
|
||||
dest.ddpf.dwFourCC = MAKEFOURCC('D','X', 'T', '1');
|
||||
dest.ddpf.dwFourCC = MAKEFOURCC('D', 'X', 'T', '1');
|
||||
break;
|
||||
case DXT3:
|
||||
flags |= squish::kDxt3;
|
||||
dest.ddpf.dwFourCC = MAKEFOURCC('D','X', 'T', '3');
|
||||
dest.ddpf.dwFourCC = MAKEFOURCC('D', 'X', 'T', '3');
|
||||
break;
|
||||
case DXT5:
|
||||
flags |= squish::kDxt5;
|
||||
dest.ddpf.dwFourCC = MAKEFOURCC('D','X', 'T', '5');
|
||||
dest.ddpf.dwFourCC = MAKEFOURCC('D', 'X', 'T', '5');
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -154,7 +154,7 @@ private:
|
|||
/// Serializes
|
||||
void serial(NLMISC::IStream &f)
|
||||
{
|
||||
f.serialCheck((uint32)('PCHK'));
|
||||
f.serialCheck(NELID("PCHK"));
|
||||
f.serialVersion(0);
|
||||
|
||||
if (f.isReading())
|
||||
|
|
|
@ -591,7 +591,7 @@ bool CDBCtrlSheet::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
|||
return false;
|
||||
|
||||
prop = (char*) xmlGetProp( cur, (xmlChar*)"dragable" );
|
||||
if( prop != NULL )
|
||||
if (prop)
|
||||
setDraggable( CInterfaceElement::convertBool(prop) );
|
||||
else
|
||||
setDraggable( false );
|
||||
|
|
|
@ -2277,7 +2277,7 @@ public:
|
|||
sint32 xmax = (sint32) max.x();
|
||||
sint32 ymin = (sint32) (sint16) min.y();
|
||||
sint32 ymax = (sint32) (sint16) max.y();
|
||||
output.serialCheck((uint32) 'OBSI');
|
||||
output.serialCheck(NELID("OBSI"));
|
||||
output.serial(xmin);
|
||||
output.serial(xmax);
|
||||
output.serial(ymin);
|
||||
|
|
|
@ -1700,7 +1700,7 @@ NLMISC_COMMAND(scriptHex,"execute a hex-encoded script for a group in the given
|
|||
return true;
|
||||
}
|
||||
|
||||
static char* hexEncoderTcl =
|
||||
static const char* hexEncoderTcl =
|
||||
"proc copy_encoded {} {"
|
||||
" # Get the args from the text fields"
|
||||
" set group [ .group.name get 1.0 end ]"
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
namespace EGSPD
|
||||
{
|
||||
|
||||
static const struct { char* Name; CFameTrend::TFameTrend Value; } TFameTrendConvert[] =
|
||||
static const struct { const char* Name; CFameTrend::TFameTrend Value; } TFameTrendConvert[] =
|
||||
{
|
||||
{ "FameUpward", CFameTrend::FameUpward },
|
||||
{ "FameDownward", CFameTrend::FameDownward },
|
||||
|
|
|
@ -494,7 +494,7 @@ bool CGuildMemberModule::canAffectGrade(EGSPD::CGuildGrade::TGuildGrade)const
|
|||
CMissionGuild * CGuildMemberModule::pickMission( TAIAlias alias )
|
||||
{
|
||||
/// todo guild mission
|
||||
return false;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
|
|
@ -349,13 +349,13 @@ static std::string getActiveOutputPath()
|
|||
if (TheCharScanScriptFile==NULL)
|
||||
{
|
||||
nlwarning("There is no active script file right now from which to extract output directory");
|
||||
return false;
|
||||
return "";
|
||||
}
|
||||
bool isOK=true;
|
||||
|
||||
// write the current script file to a tmp file
|
||||
isOK=TheCharScanScriptFile->writeToFile(TmpScriptFileName);
|
||||
if (!isOK) return false;
|
||||
if (!isOK) return "";
|
||||
|
||||
// create a new script object and assign the tmp file to it
|
||||
CCharScanScript script;
|
||||
|
|
|
@ -336,7 +336,7 @@ void cbImpulsionFilter( CMessage& msgin, const string &serviceName, TServiceId s
|
|||
} // impulsionFilter //
|
||||
|
||||
|
||||
static char*DebugChatModeName[] =
|
||||
static const char* DebugChatModeName[] =
|
||||
{
|
||||
"say",
|
||||
"shout",
|
||||
|
|
|
@ -42,7 +42,7 @@ extern CVariable<bool> VerboseStringManager;
|
|||
#define LOG if (!VerboseStringManager) {} else nlinfo
|
||||
|
||||
|
||||
char *OperatorNames[] =
|
||||
const char *OperatorNames[] =
|
||||
{
|
||||
"equal",
|
||||
"notEqual",
|
||||
|
|
|
@ -521,9 +521,7 @@ public:
|
|||
BsiGlobal);
|
||||
saveFile.FileName = threadResult.OutputFilename;
|
||||
|
||||
char *newLine="\n";
|
||||
|
||||
|
||||
const char *newLine="\n";
|
||||
|
||||
list<string>::const_iterator first(threadResult.Lines->begin()), last(threadResult.Lines->end());
|
||||
for (uint32 localCounter = 0; first != last; ++first, ++localCounter)
|
||||
|
|
|
@ -104,7 +104,7 @@ public:
|
|||
FILE* fileHandle= fopen(DailyActivityLogFileName,"ab");
|
||||
nlassert(fileHandle!=NULL);
|
||||
fprintf(fileHandle,"%02u/%02u/%u CDailyTaskScheduler: Started: %02u:%02u, Finished: %02u:%02u, Executed %u commands Started %u Jobs\n",
|
||||
ptm->tm_mday, ptm->tm_mon+1, ptm->tm_year+1900, startTime/3600%24, startTime/60%60, endTime/3600%24, endTime/60%60, commandsVar==NULL?0:commandsVar->size(), jobsRemaining );
|
||||
ptm->tm_mday, ptm->tm_mon+1, ptm->tm_year+1900, (uint)startTime/3600%24, (uint)startTime/60%60, (uint)endTime/3600%24, (uint)endTime/60%60, commandsVar==NULL?0:commandsVar->size(), jobsRemaining );
|
||||
nlinfo("JobManager state: %s",CJobManager::getInstance()->getStatus().c_str());
|
||||
fclose(fileHandle);
|
||||
}
|
||||
|
|
|
@ -518,13 +518,13 @@ static std::string getActiveOutputPath()
|
|||
if (TheCharScanScriptFile==NULL)
|
||||
{
|
||||
nlwarning("There is no active script file right now from which to extract output directory");
|
||||
return false;
|
||||
return "";
|
||||
}
|
||||
bool isOK=true;
|
||||
|
||||
// write the current script file to a tmp file
|
||||
isOK=TheCharScanScriptFile->writeToFile(TmpScriptFileName);
|
||||
if (!isOK) return false;
|
||||
if (!isOK) return "";
|
||||
|
||||
// create a new script object and assign the tmp file to it
|
||||
CCharScanScriptFile script;
|
||||
|
|
|
@ -176,7 +176,7 @@ CTimestamp CDbManager::_LastUpdateTime;
|
|||
*/
|
||||
CDatabase* CDbManager::createDatabase(TDatabaseId id, CLog* log)
|
||||
{
|
||||
CHECK_DB_MGR_INIT(createDatabase, false);
|
||||
CHECK_DB_MGR_INIT(createDatabase, NULL);
|
||||
|
||||
// check db doesn't exist yet
|
||||
CDatabase* db = getDatabase(id);
|
||||
|
@ -229,7 +229,7 @@ bool CDbManager::deleteDatabase(TDatabaseId id, CLog* log)
|
|||
*/
|
||||
CDatabase* CDbManager::loadDatabase(TDatabaseId id, const string& description, CLog* log)
|
||||
{
|
||||
CHECK_DB_MGR_INIT(loadDatabase, false);
|
||||
CHECK_DB_MGR_INIT(loadDatabase, NULL);
|
||||
|
||||
nlinfo("CDbManager::loadDatabase(): load/setup database '%d'", id);
|
||||
|
||||
|
|
|
@ -1195,7 +1195,7 @@ CDatabase* CDatabase::adapt(const string& description)
|
|||
if (!buildReference())
|
||||
{
|
||||
PDS_WARNING("adapt(): failed to buildReference()");
|
||||
return false;
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -194,7 +194,7 @@ string CType::getIndexName(TEnumValue value, bool verbose) const
|
|||
if (!isIndex())
|
||||
{
|
||||
PDS_WARNING("getIndexName(): type is not an index");
|
||||
return false;
|
||||
return "";
|
||||
}
|
||||
|
||||
if (isEnum())
|
||||
|
|
|
@ -276,7 +276,7 @@ int main(int argc, char* argv[])
|
|||
try
|
||||
{
|
||||
CIFile f(builderConfig.CWMapCachePath + "/" + shortname + ".cw_height");
|
||||
f.serialCheck((uint32) 'OBSI');
|
||||
f.serialCheck(NELID("OBSI"));
|
||||
f.serial(xmin);
|
||||
f.serial(xmax);
|
||||
f.serial(ymin);
|
||||
|
@ -322,7 +322,7 @@ int main(int argc, char* argv[])
|
|||
// now extract each island height
|
||||
// read back coordinates
|
||||
CIFile f(builderConfig.CWMapCachePath + "/" + shortname + ".cw_height");
|
||||
f.serialCheck((uint32) 'OBSI');
|
||||
f.serialCheck(NELID("OBSI"));
|
||||
f.serial(xmin);
|
||||
f.serial(xmax);
|
||||
f.serial(ymin);
|
||||
|
@ -349,7 +349,7 @@ int main(int argc, char* argv[])
|
|||
try
|
||||
{
|
||||
COFile f(builderConfig.OutputPath + "/" + completeIslands[l]->Island + ".island_hm");
|
||||
f.serialCheck((uint32) 'MHSI');
|
||||
f.serialCheck(NELID("MHSI"));
|
||||
f.serial(island);
|
||||
// export tga for check
|
||||
if (builderConfig.HeightMapsAsTga)
|
||||
|
|
|
@ -401,7 +401,7 @@ void CPackedWorldBuilder::fly(std::vector<CIslandInfo> &islands, float camSpeed
|
|||
// fly into scene
|
||||
try
|
||||
{
|
||||
CNELU::init(1024, 768, CViewport(), 32, true, NULL, false, true);
|
||||
CNELU::init(1024, 768, CViewport(), 32, true, EmptyWindow, false, true);
|
||||
}
|
||||
catch(const Exception &e)
|
||||
{
|
||||
|
|
|
@ -607,7 +607,7 @@ int main(int argc, char* argv[])
|
|||
// fly into scene
|
||||
try
|
||||
{
|
||||
CNELU::init(1024, 768, CViewport(), 32, true, NULL, false, true);
|
||||
CNELU::init(1024, 768, CViewport(), 32, true, EmptyWindow, false, true);
|
||||
}
|
||||
catch(const Exception &e)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue