mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-05 23:09:04 +00:00
Changed: #825 Remove all warning when compiling Ryzom
This commit is contained in:
parent
1347527272
commit
75f8af21f2
12 changed files with 71 additions and 51 deletions
|
@ -489,7 +489,7 @@ public:
|
|||
void execute (CCtrlBase * /* pCaller */, const std::string &sParams)
|
||||
{
|
||||
std::string id = getParam(sParams, "id");
|
||||
int intId;
|
||||
sint intId;
|
||||
if (!fromString(id, intId)) return;
|
||||
//nlinfo("intId = %d", intId);
|
||||
CBotChatManager::getInstance()->incrementSessionID();
|
||||
|
@ -1089,7 +1089,7 @@ public:
|
|||
void execute (CCtrlBase * /* pCaller */, const std::string &sParams)
|
||||
{
|
||||
std::string id = getParam(sParams, "id");
|
||||
int idInDb;
|
||||
sint idInDb;
|
||||
if (!fromString(id, idInDb)) return;
|
||||
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
|
|
|
@ -287,7 +287,7 @@ class CAHChangeDMOption : public IActionHandler
|
|||
virtual void execute (CCtrlBase * /* pCaller */, const string ¶ms)
|
||||
{
|
||||
//get id of choice
|
||||
int id;
|
||||
sint id;
|
||||
if (!NLMISC::fromString(getParam(params, "id"), id))
|
||||
{
|
||||
nlwarning("Bad choice list id");
|
||||
|
|
|
@ -138,8 +138,10 @@ void CGroupHTML::checkImageDownload()
|
|||
// check msg
|
||||
CURLMsg *msg;
|
||||
int msgs_left;
|
||||
while ((msg = curl_multi_info_read(MultiCurl, &msgs_left))) {
|
||||
if (msg->msg == CURLMSG_DONE) {
|
||||
while ((msg = curl_multi_info_read(MultiCurl, &msgs_left)))
|
||||
{
|
||||
if (msg->msg == CURLMSG_DONE)
|
||||
{
|
||||
for (vector<CImageDownload>::iterator it=Curls.begin(); it<Curls.end(); it++)
|
||||
{
|
||||
if(msg->easy_handle == it->curl)
|
||||
|
@ -2597,9 +2599,10 @@ static int timer_called = 0;
|
|||
static int
|
||||
timer_callback(HTTimer * const timer ,
|
||||
void * const user_data ,
|
||||
HTEventType const event ) {
|
||||
HTEventType const event )
|
||||
{
|
||||
/*----------------------------------------------------------------------------
|
||||
A handy timer callback which cancels the running event loop.
|
||||
A handy timer callback which cancels the running event loop.
|
||||
-----------------------------------------------------------------------------*/
|
||||
nlassert(event == HTEvent_TIMEOUT);
|
||||
timer_called = 1;
|
||||
|
@ -2610,7 +2613,8 @@ timer_callback(HTTimer * const timer ,
|
|||
return HT_OK;
|
||||
}
|
||||
|
||||
static void handleLibwwwEvents() {
|
||||
static void handleLibwwwEvents()
|
||||
{
|
||||
HTTimer *timer;
|
||||
timer_called = 0;
|
||||
timer = HTTimer_new(NULL, &timer_callback, NULL,
|
||||
|
|
|
@ -110,7 +110,8 @@ struct CWebigNotificationThread : public NLMISC::IRunnable
|
|||
|
||||
~CWebigNotificationThread()
|
||||
{
|
||||
if(Curl) {
|
||||
if(Curl)
|
||||
{
|
||||
curl_easy_cleanup(Curl);
|
||||
Curl = 0;
|
||||
}
|
||||
|
@ -189,7 +190,8 @@ struct CWebigNotificationThread : public NLMISC::IRunnable
|
|||
{
|
||||
std::string chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
std::string s;
|
||||
for (int i = 0; i < 32; i++) {
|
||||
for (int i = 0; i < 32; i++)
|
||||
{
|
||||
s += chars[uint(frand(float(chars.size())))];
|
||||
}
|
||||
return s;
|
||||
|
|
|
@ -111,7 +111,7 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (class CEntityCL *entity)
|
|||
// NB: fauna can be friend too (kami!!!)
|
||||
bool npcFriendAndNeutral = (entity->canHaveMissionIcon() || entity->isFauna()) && entity->isFriend ();
|
||||
// if the npc is an ally (outpost squad for instance) still display its bar
|
||||
if(npcFriendAndNeutral)
|
||||
if (npcFriendAndNeutral)
|
||||
npcFriendAndNeutral= npcFriendAndNeutral && !entity->isAlly();
|
||||
|
||||
// Window id
|
||||
|
|
|
@ -733,8 +733,8 @@ void CGroupSubMenu::updateCoords ()
|
|||
|
||||
sint32 limY = refElmYReal + refElmHReal/2 - _GroupList->getYReal();
|
||||
// Setup the arrow at the right pos
|
||||
if(_GroupList->getMaxH()>=limY && limY>=0){
|
||||
|
||||
if(_GroupList->getMaxH()>=limY && limY>=0)
|
||||
{
|
||||
pVB->setY(refElmYReal + (refElmHReal - pVB->getHReal()) / 2 - _GroupList->getYReal());
|
||||
pVB->setActive(_Lines[CBLineNb].ViewText->getActive());
|
||||
}
|
||||
|
|
|
@ -392,7 +392,8 @@ int CGroupTab::luaGetTabButton(CLuaState &ls)
|
|||
CLuaIHM::checkArgCount(ls, funcName, 1);
|
||||
CLuaIHM::checkArgType(ls, funcName, 1, LUA_TNUMBER);
|
||||
CCtrlTabButton* tab = getTabButton((uint) ls.toNumber(1));
|
||||
if(tab != NULL){
|
||||
if(tab != NULL)
|
||||
{
|
||||
CLuaIHM::pushUIOnStack(ls, tab);
|
||||
return 1;
|
||||
}
|
||||
|
@ -722,7 +723,8 @@ int CGroupTab::luaGetGroup(CLuaState &ls)
|
|||
CLuaIHM::checkArgCount(ls, funcName, 1);
|
||||
CLuaIHM::checkArgType(ls, funcName, 1, LUA_TNUMBER);
|
||||
CInterfaceGroup* group = getGroup((uint) ls.toNumber(1));
|
||||
if(group != NULL){
|
||||
if(group != NULL)
|
||||
{
|
||||
CLuaIHM::pushUIOnStack(ls, group);
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -2633,7 +2633,8 @@ bool CInterfaceManager::handleEvent (const CEventDescriptor& event)
|
|||
// Hide menu (or popup menu) is ESCAPE pressed
|
||||
if( eventDesc.getKeyEventType() == CEventDescriptorKey::keychar && eventDesc.getChar() == KeyESCAPE )
|
||||
{
|
||||
if(_ModalStack.size() > 0) {
|
||||
if(_ModalStack.size() > 0)
|
||||
{
|
||||
CModalWndInfo mwi = _ModalStack.back();
|
||||
if (mwi.ModalExitKeyPushed)
|
||||
disableModalWindow();
|
||||
|
@ -5571,6 +5572,7 @@ public:
|
|||
{
|
||||
ucstr = ucstring("&EMT&") + UserEntity->getDisplayName() + ucstring(" ") + ucstr;
|
||||
}
|
||||
|
||||
out.serialEnum(behavToSend);
|
||||
out.serial(ucstr);
|
||||
NetMngr.push(out);
|
||||
|
|
|
@ -89,7 +89,8 @@ PRIVATE int FileCleanup (HTRequest *req, int status)
|
|||
HTStream * input = HTRequest_inputStream(req);
|
||||
|
||||
/* Free stream with data TO Local file system */
|
||||
if (input) {
|
||||
if (input)
|
||||
{
|
||||
if (status == HT_INTERRUPTED)
|
||||
(*input->isa->abort)(input, NULL);
|
||||
else
|
||||
|
@ -100,16 +101,19 @@ PRIVATE int FileCleanup (HTRequest *req, int status)
|
|||
/*
|
||||
** Remove if we have registered a timer function as a callback
|
||||
*/
|
||||
if (file->timer) {
|
||||
HTTimer_delete(file->timer);
|
||||
file->timer = NULL;
|
||||
if (file->timer)
|
||||
{
|
||||
HTTimer_delete(file->timer);
|
||||
file->timer = NULL;
|
||||
}
|
||||
|
||||
if (file) {
|
||||
HT_FREE(file->local);
|
||||
HT_FREE(file);
|
||||
if (file)
|
||||
{
|
||||
HT_FREE(file->local);
|
||||
HT_FREE(file);
|
||||
}
|
||||
HTNet_delete(net, status);
|
||||
|
||||
HTNet_delete(net, status);
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
@ -181,32 +185,37 @@ PRIVATE int FileEvent (SOCKET /* soc */, void * pVoid, HTEventType type)
|
|||
HTRequest * request = HTNet_request(net);
|
||||
HTParentAnchor * anchor = HTRequest_anchor(request);
|
||||
|
||||
if (type == HTEvent_CLOSE) { /* Interrupted */
|
||||
HTRequest_addError(request, ERR_FATAL, NO, HTERR_INTERRUPTED,
|
||||
NULL, 0, "HTLoadFile");
|
||||
FileCleanup(request, HT_INTERRUPTED);
|
||||
return HT_OK;
|
||||
if (type == HTEvent_CLOSE)
|
||||
{
|
||||
/* Interrupted */
|
||||
HTRequest_addError(request, ERR_FATAL, NO, HTERR_INTERRUPTED,
|
||||
NULL, 0, "HTLoadFile");
|
||||
FileCleanup(request, HT_INTERRUPTED);
|
||||
return HT_OK;
|
||||
}
|
||||
|
||||
|
||||
/* Now jump into the machine. We know the state from the previous run */
|
||||
for(;;) {
|
||||
switch (file->state) {
|
||||
for(;;)
|
||||
{
|
||||
switch (file->state)
|
||||
{
|
||||
case FS_BEGIN:
|
||||
|
||||
/* We only support safe (GET, HEAD, etc) methods for the moment */
|
||||
if (!HTMethod_isSafe(HTRequest_method(request))) {
|
||||
HTRequest_addError(request, ERR_FATAL, NO, HTERR_NOT_ALLOWED,
|
||||
NULL, 0, "HTLoadFile");
|
||||
NULL, 0, (char*)"HTLoadFile");
|
||||
file->state = FS_ERROR;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Check whether we have access to local disk at all */
|
||||
if (HTLib_secure()) {
|
||||
HTTRACE(PROT_TRACE, "LoadFile.... No access to local file system\n");
|
||||
file->state = FS_TRY_FTP;
|
||||
break;
|
||||
if (HTLib_secure())
|
||||
{
|
||||
HTTRACE(PROT_TRACE, "LoadFile.... No access to local file system\n");
|
||||
file->state = FS_TRY_FTP;
|
||||
break;
|
||||
}
|
||||
|
||||
/*file->local = HTWWWToLocal(HTAnchor_physical(anchor), "",
|
||||
|
@ -220,15 +229,16 @@ PRIVATE int FileEvent (SOCKET /* soc */, void * pVoid, HTEventType type)
|
|||
StrAllocCopy(file->local, tmp.c_str());
|
||||
}
|
||||
|
||||
if (!file->local) {
|
||||
file->state = FS_TRY_FTP;
|
||||
break;
|
||||
if (!file->local)
|
||||
{
|
||||
file->state = FS_TRY_FTP;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Create a new host object and link it to the net object */
|
||||
{
|
||||
HTHost * host = NULL;
|
||||
if ((host = HTHost_new("localhost", 0)) == NULL) return HT_ERROR;
|
||||
if ((host = HTHost_new((char*)"localhost", 0)) == NULL) return HT_ERROR;
|
||||
HTNet_setHost(net, host);
|
||||
if (HTHost_addNet(host, net) == HT_PENDING) {
|
||||
HTTRACE(PROT_TRACE, "HTLoadFile.. Pending...\n");
|
||||
|
@ -243,7 +253,7 @@ PRIVATE int FileEvent (SOCKET /* soc */, void * pVoid, HTEventType type)
|
|||
case FS_PENDING:
|
||||
{
|
||||
HTHost * host = NULL;
|
||||
if ((host = HTHost_new("localhost", 0)) == NULL) return HT_ERROR;
|
||||
if ((host = HTHost_new((char*)"localhost", 0)) == NULL) return HT_ERROR;
|
||||
HTNet_setHost(net, host);
|
||||
if (HTHost_addNet(host, net) == HT_PENDING) {
|
||||
HTTRACE(PROT_TRACE, "HTLoadFile.. Pending...\n");
|
||||
|
@ -265,7 +275,7 @@ PRIVATE int FileEvent (SOCKET /* soc */, void * pVoid, HTEventType type)
|
|||
if (HT_STAT(file->local, &file->stat_info) == -1) {
|
||||
HTTRACE(PROT_TRACE, "Load File... Not found `%s\'\n" _ file->local);
|
||||
HTRequest_addError(request, ERR_FATAL, NO, HTERR_NOT_FOUND,
|
||||
NULL, 0, "HTLoadFile");
|
||||
NULL, 0, (char*)"HTLoadFile");
|
||||
file->state = FS_ERROR;
|
||||
break;
|
||||
}
|
||||
|
@ -276,7 +286,7 @@ PRIVATE int FileEvent (SOCKET /* soc */, void * pVoid, HTEventType type)
|
|||
file->state = FS_PARSE_DIR;
|
||||
else {
|
||||
HTRequest_addError(request, ERR_INFO, NO, HTERR_NO_CONTENT,
|
||||
NULL, 0, "HTLoadFile");
|
||||
NULL, 0, (char*)"HTLoadFile");
|
||||
file->state = FS_NO_DATA;
|
||||
}
|
||||
break;
|
||||
|
@ -305,7 +315,7 @@ PRIVATE int FileEvent (SOCKET /* soc */, void * pVoid, HTEventType type)
|
|||
/* Check to see if we can edit it */
|
||||
if (!editable && !file->stat_info.st_size) {
|
||||
HTRequest_addError(request, ERR_INFO, NO, HTERR_NO_CONTENT,
|
||||
NULL, 0, "HTLoadFile");
|
||||
NULL, 0, (char*)"HTLoadFile");
|
||||
file->state = FS_NO_DATA;
|
||||
} else {
|
||||
file->state = (HTRequest_method(request)==METHOD_GET) ?
|
||||
|
@ -334,7 +344,7 @@ PRIVATE int FileEvent (SOCKET /* soc */, void * pVoid, HTEventType type)
|
|||
if (HTRequest_isSource(request) && !HTRequest_destinationsReady(request))
|
||||
return HT_OK;
|
||||
HTRequest_addError(request, ERR_INFO, NO, HTERR_OK, NULL, 0,
|
||||
"HTLoadFile");
|
||||
(char*)"HTLoadFile");
|
||||
file->state = FS_NEED_BODY;
|
||||
|
||||
if (HTEvent_isCallbacksRegistered()) {
|
||||
|
@ -354,7 +364,7 @@ PRIVATE int FileEvent (SOCKET /* soc */, void * pVoid, HTEventType type)
|
|||
return HT_OK;
|
||||
else {
|
||||
HTRequest_addError(request, ERR_INFO, NO, HTERR_INTERNAL,
|
||||
NULL, 0, "HTLoadFile");
|
||||
NULL, 0, (char*)"HTLoadFile");
|
||||
file->state = FS_ERROR; /* Error or interrupt */
|
||||
}
|
||||
break;
|
||||
|
@ -367,7 +377,7 @@ PRIVATE int FileEvent (SOCKET /* soc */, void * pVoid, HTEventType type)
|
|||
file->state = FS_GOT_DATA;
|
||||
} else {
|
||||
HTRequest_addError(request, ERR_INFO, NO, HTERR_FORBIDDEN,
|
||||
NULL, 0, "HTLoadFile");
|
||||
NULL, 0, (char*)"HTLoadFile");
|
||||
file->state = FS_ERROR;
|
||||
}
|
||||
break;
|
||||
|
@ -550,7 +560,7 @@ PRIVATE int HTNeLReader_abort (HTInputStream * me, HTList * /* e */)
|
|||
|
||||
PRIVATE const HTInputStreamClass HTNeLReader =
|
||||
{
|
||||
"SocketReader",
|
||||
(char*)"SocketReader",
|
||||
HTNeLReader_flush,
|
||||
HTNeLReader_free,
|
||||
HTNeLReader_abort,
|
||||
|
|
|
@ -167,4 +167,4 @@ private:
|
|||
virtual void childrenMoved(uint srcIndex, uint destIndex, CGroupContainer *children);
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -581,4 +581,4 @@ int LzmaDecode(CLzmaDecoderState *vs,
|
|||
#endif
|
||||
*outSizeProcessed = nowPos;
|
||||
return LZMA_RESULT_OK;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1994,7 +1994,7 @@ void CUserEntity::updatePos(const TTime &t, CEntityCL *target)
|
|||
// Compute the Time Step.
|
||||
double frameTimeRemaining = computeTimeStep(((double)t)*0.001);
|
||||
// Do not update animation if Client Light
|
||||
if(ClientCfg.Light == false)
|
||||
if (!ClientCfg.Light)
|
||||
{
|
||||
// Attack Animation.
|
||||
if(_AnimAttackOn)
|
||||
|
|
Loading…
Reference in a new issue