diff --git a/code/ryzom/client/src/interface_v3/action_handler_game.cpp b/code/ryzom/client/src/interface_v3/action_handler_game.cpp index 98decfedd..11703d5fa 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_game.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_game.cpp @@ -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(); diff --git a/code/ryzom/client/src/interface_v3/bot_chat_page_dynamic_mission.cpp b/code/ryzom/client/src/interface_v3/bot_chat_page_dynamic_mission.cpp index fbddbbc49..a9f9624fd 100644 --- a/code/ryzom/client/src/interface_v3/bot_chat_page_dynamic_mission.cpp +++ b/code/ryzom/client/src/interface_v3/bot_chat_page_dynamic_mission.cpp @@ -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"); diff --git a/code/ryzom/client/src/interface_v3/group_html.cpp b/code/ryzom/client/src/interface_v3/group_html.cpp index 3ea937fa3..baad72f30 100644 --- a/code/ryzom/client/src/interface_v3/group_html.cpp +++ b/code/ryzom/client/src/interface_v3/group_html.cpp @@ -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::iterator it=Curls.begin(); iteasy_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, diff --git a/code/ryzom/client/src/interface_v3/group_html_webig.cpp b/code/ryzom/client/src/interface_v3/group_html_webig.cpp index 393b690b6..ac866830b 100644 --- a/code/ryzom/client/src/interface_v3/group_html_webig.cpp +++ b/code/ryzom/client/src/interface_v3/group_html_webig.cpp @@ -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; diff --git a/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp b/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp index 4da5550ad..cfce12775 100644 --- a/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp +++ b/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp @@ -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 diff --git a/code/ryzom/client/src/interface_v3/group_menu.cpp b/code/ryzom/client/src/interface_v3/group_menu.cpp index 41e150184..0c0bce9a8 100644 --- a/code/ryzom/client/src/interface_v3/group_menu.cpp +++ b/code/ryzom/client/src/interface_v3/group_menu.cpp @@ -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()); } diff --git a/code/ryzom/client/src/interface_v3/group_tab.cpp b/code/ryzom/client/src/interface_v3/group_tab.cpp index 8a90bfe47..33588cbb9 100644 --- a/code/ryzom/client/src/interface_v3/group_tab.cpp +++ b/code/ryzom/client/src/interface_v3/group_tab.cpp @@ -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; } diff --git a/code/ryzom/client/src/interface_v3/interface_manager.cpp b/code/ryzom/client/src/interface_v3/interface_manager.cpp index 19bf7aa59..4247fd46a 100644 --- a/code/ryzom/client/src/interface_v3/interface_manager.cpp +++ b/code/ryzom/client/src/interface_v3/interface_manager.cpp @@ -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); diff --git a/code/ryzom/client/src/interface_v3/libwww_nel_stream.cpp b/code/ryzom/client/src/interface_v3/libwww_nel_stream.cpp index 4667f4c17..e89a58909 100644 --- a/code/ryzom/client/src/interface_v3/libwww_nel_stream.cpp +++ b/code/ryzom/client/src/interface_v3/libwww_nel_stream.cpp @@ -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, diff --git a/code/ryzom/client/src/interface_v3/people_list.h b/code/ryzom/client/src/interface_v3/people_list.h index fd7ffbbcd..caa7167cd 100644 --- a/code/ryzom/client/src/interface_v3/people_list.h +++ b/code/ryzom/client/src/interface_v3/people_list.h @@ -167,4 +167,4 @@ private: virtual void childrenMoved(uint srcIndex, uint destIndex, CGroupContainer *children); }; -#endif \ No newline at end of file +#endif diff --git a/code/ryzom/client/src/seven_zip/LzmaDecode.cpp b/code/ryzom/client/src/seven_zip/LzmaDecode.cpp index d66ec3589..97c02fa98 100644 --- a/code/ryzom/client/src/seven_zip/LzmaDecode.cpp +++ b/code/ryzom/client/src/seven_zip/LzmaDecode.cpp @@ -581,4 +581,4 @@ int LzmaDecode(CLzmaDecoderState *vs, #endif *outSizeProcessed = nowPos; return LZMA_RESULT_OK; -} \ No newline at end of file +} diff --git a/code/ryzom/client/src/user_entity.cpp b/code/ryzom/client/src/user_entity.cpp index 57031e84b..cfc661620 100644 --- a/code/ryzom/client/src/user_entity.cpp +++ b/code/ryzom/client/src/user_entity.cpp @@ -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)