diff --git a/code/ryzom/client/src/client_sheets/attack_id_sheet.cpp b/code/ryzom/client/src/client_sheets/attack_id_sheet.cpp index b8279b1ec..76a34a9e0 100644 --- a/code/ryzom/client/src/client_sheets/attack_id_sheet.cpp +++ b/code/ryzom/client/src/client_sheets/attack_id_sheet.cpp @@ -113,8 +113,8 @@ bool operator == (const CAttackIDSheet &lhs, const CAttackIDSheet &rhs) case CAttackIDSheet::Magic: return lhs.SpellInfo == rhs.SpellInfo; case CAttackIDSheet::Creature: return lhs.CreatureAttackIndex == rhs.CreatureAttackIndex; case CAttackIDSheet::DamageShield: return lhs.DamageShieldType == rhs.DamageShieldType; + default: return false; } - return false; } //***************************************************************************************** @@ -128,8 +128,8 @@ bool operator < (const CAttackIDSheet &lhs, const CAttackIDSheet &rhs) case CAttackIDSheet::Magic: return lhs.SpellInfo < rhs.SpellInfo; case CAttackIDSheet::Creature: return lhs.CreatureAttackIndex < rhs.CreatureAttackIndex; case CAttackIDSheet::DamageShield: return lhs.DamageShieldType < rhs.DamageShieldType; + default: return false; } - return false; } //***************************************************************************************** @@ -144,4 +144,4 @@ bool operator < (const CAttackIDSheet::CSpellInfo &lhs, const CAttackIDSheet::CS if (lhs.Mode != rhs.Mode) return lhs.Mode < rhs.Mode; if (lhs.ID != rhs.ID) return lhs.ID < rhs.ID; return false; -} +} \ No newline at end of file diff --git a/code/ryzom/client/src/client_sheets/body_to_bone_sheet.cpp b/code/ryzom/client/src/client_sheets/body_to_bone_sheet.cpp index 6d717ec2f..a841ec7b5 100644 --- a/code/ryzom/client/src/client_sheets/body_to_bone_sheet.cpp +++ b/code/ryzom/client/src/client_sheets/body_to_bone_sheet.cpp @@ -86,6 +86,6 @@ const char *CBodyToBoneSheet::getBoneName(BODY::TBodyPart part, BODY::TSide side case BODY::HHands: return ClientSheetsStrings.get(side == BODY::Left ? LeftHand : RightHand); case BODY::HLegs: return ClientSheetsStrings.get(side == BODY::Left ? LeftLeg : RightLeg); case BODY::HFeet: return ClientSheetsStrings.get(side == BODY::Left ? LeftFoot : RightFoot); + default: return NULL; } - return NULL; -} +} \ No newline at end of file diff --git a/code/ryzom/client/src/client_sheets/item_sheet.cpp b/code/ryzom/client/src/client_sheets/item_sheet.cpp index aee6b4f88..3bb4810c8 100644 --- a/code/ryzom/client/src/client_sheets/item_sheet.cpp +++ b/code/ryzom/client/src/client_sheets/item_sheet.cpp @@ -742,8 +742,8 @@ SKILLS::ESkills CItemSheet::getRequiredSkill() const return Tool.Skill; case ITEMFAMILY::CRAFTING_TOOL: return SKILLS::SC; + default: return SKILLS::unknown; } - return SKILLS::unknown; } // *************************************************************************** @@ -936,4 +936,3 @@ void CItemSheet::getItemPartListAsText(ucstring &ipList) const ipList= CI18N::get("uihelpItemMPAllCraft"); } } - diff --git a/code/ryzom/client/src/connection.cpp b/code/ryzom/client/src/connection.cpp index 9fb943601..30e8842f3 100644 --- a/code/ryzom/client/src/connection.cpp +++ b/code/ryzom/client/src/connection.cpp @@ -440,7 +440,7 @@ bool connection (const string &cookie, const string &fsaddr) { case AUTO_LOGIN: InterfaceState = autoLogin (cookie, fsaddr, firstConnection); - break; + break; case GLOBAL_MENU: if (!ClientCfg.Local) @@ -451,7 +451,11 @@ bool connection (const string &cookie, const string &fsaddr) } } InterfaceState = globalMenu(); - break; + break; + case GOGOGO_IN_THE_GAME: + break; + case QUIT_THE_GAME: + break; } } @@ -3408,4 +3412,3 @@ class CAHOpenRingSessions : public IActionHandler } }; REGISTER_ACTION_HANDLER (CAHOpenRingSessions, "open_ring_sessions"); - diff --git a/code/ryzom/client/src/debug_client.cpp b/code/ryzom/client/src/debug_client.cpp index 663fa9965..ec3fd117c 100644 --- a/code/ryzom/client/src/debug_client.cpp +++ b/code/ryzom/client/src/debug_client.cpp @@ -22,6 +22,8 @@ ///////////// #include "stdpch.h" // First include for pre-compiled headers. +#include + // OS. #ifdef NL_OS_WINDOWS # include @@ -249,6 +251,7 @@ double memoryUsedSinceLastCall() nlwarning("There are %*lx free %sbytes of virtual memory.\n", WIDTH, stat.dwAvailVirtual/DIV, divisor); */ #endif + return std::numeric_limits::quiet_NaN(); } @@ -690,4 +693,3 @@ bool verboseVPAdvanceTest(CEntityCL *en, uint32 form) - diff --git a/code/ryzom/client/src/far_tp.cpp b/code/ryzom/client/src/far_tp.cpp index de44925d9..4d0483a38 100644 --- a/code/ryzom/client/src/far_tp.cpp +++ b/code/ryzom/client/src/far_tp.cpp @@ -636,6 +636,9 @@ void CLoginStateMachine::run() SM_EVENT(ev_quit, st_end); SM_END_EVENT_TABLE break; + default: + nlwarning("Unhandeled state"); + break; } } } @@ -747,7 +750,9 @@ retryJoinEdit: throw "Protocol error"; if (sb._LastJoinSessionResult == 16) { -#pragma message (NL_LOC_WRN "inform the player that he is banned from the ring") +#ifdef NL_OS_WINDOWS + #pragma message (NL_LOC_WRN "inform the player that he is banned from the ring") +#endif // NL_OS_WINDOWS throw "User ban from the ring"; } if (sb._LastJoinSessionResult != 0) @@ -1449,4 +1454,3 @@ void CFarTP::farTPmainLoop() } - diff --git a/code/ryzom/client/src/forage_source_cl.cpp b/code/ryzom/client/src/forage_source_cl.cpp index d52d21a44..a70e53437 100644 --- a/code/ryzom/client/src/forage_source_cl.cpp +++ b/code/ryzom/client/src/forage_source_cl.cpp @@ -47,13 +47,14 @@ CRGBA CForageSourceCL::SafeSourceColor(64, 192, 255); * Constructor */ CForageSourceCL::CForageSourceCL() : - CFxCL(), _IsExtractionInProgress( false ), + CFxCL(), + _InSceneUserInterface( NULL ), + _IconFilename( NULL ), + _IsExtractionInProgress( false ), _SafeSource( false ), _KnowledgeLevel( 0 ), - _InSceneUserInterface( NULL ), _LastExplosionSwitch( 0 ), _ProspectorSlot( 255 ), - _IconFilename( NULL ), _ExtraTime(0), _InclBonusExtraTime(0), _InitialQuantity(BarNotInit), @@ -681,4 +682,4 @@ NLMISC_COMMAND( viewSourcePos, "", "" ) ViewedSource->displayInscenePos(); } return true; -}*/ +}*/ \ No newline at end of file diff --git a/code/ryzom/client/src/game_context_menu.cpp b/code/ryzom/client/src/game_context_menu.cpp index 4004a7df4..84b31db53 100644 --- a/code/ryzom/client/src/game_context_menu.cpp +++ b/code/ryzom/client/src/game_context_menu.cpp @@ -955,7 +955,7 @@ bool testMenuOptionForPackAnimal( CEntityCL* selectedAnimalInVision, uint index, } // Don't enable anything if index not found (e.g. the character is not the owner of the animal) - if ( (index == -1) || (!UserEntity) ) + if ( (index == (uint)-1) || (!UserEntity) ) return false; // Get animal status and type @@ -1055,4 +1055,3 @@ bool testMenuOptionForPackAnimal( CEntityCL* selectedAnimalInVision, uint index, return true; } - diff --git a/code/ryzom/client/src/graph.h b/code/ryzom/client/src/graph.h index 5f1181ce6..b16f3a62a 100644 --- a/code/ryzom/client/src/graph.h +++ b/code/ryzom/client/src/graph.h @@ -93,8 +93,8 @@ public: NLMISC::TTime quantum, float maxValue, uint page, bool lineMode = false) - : Name(name), X(x), Y(y), Width(width), Height(height), BackColor(backColor), Quantum(quantum), - CurrentQuantumStart(ryzomGetLocalTime ()), MaxValue(maxValue), Peak(0.0f), LineMode(lineMode), PrevY(y), Page(page) + : Name(name), X(x), Y(y), Width(width), Height(height), BackColor(backColor), MaxValue(maxValue), + Peak(0.0f), LineMode(lineMode), PrevY(y), Page(page), Quantum(quantum), CurrentQuantumStart(ryzomGetLocalTime ()) { if (_Graphs == NULL) { @@ -158,4 +158,4 @@ private: #endif // GRAPH_H -/* End of graph.h */ +/* End of graph.h */ \ No newline at end of file diff --git a/code/ryzom/client/src/ground_fx_manager.cpp b/code/ryzom/client/src/ground_fx_manager.cpp index 9bdc425d0..b96d80442 100644 --- a/code/ryzom/client/src/ground_fx_manager.cpp +++ b/code/ryzom/client/src/ground_fx_manager.cpp @@ -60,17 +60,18 @@ static const float MAX_DIST_TO_REUSE_OLD_FX = 1.5f; using namespace NLMISC; //***************************************************************************** -CGroundFXManager::CGroundFXManager() : _MaxDist(50.f), - _MaxNumFX(10), - _NumFX(0), - _MaxNumCachedFX(10), - _NumCachedFX(0), - _NumInstances(0), - _Scene(NULL), - _MinSpeed(1.5f), - _MaxSpeed(6.f), - _SpeedWaterWalkFast(3.f), - _SpeedWaterSwimFast(3.f) +CGroundFXManager::CGroundFXManager() : + _MinSpeed(1.5f), + _MaxSpeed(6.f), + _SpeedWaterWalkFast(3.f), + _SpeedWaterSwimFast(3.f), + _MaxDist(50.f), + _MaxNumFX(10), + _NumFX(0), + _MaxNumCachedFX(10), + _NumCachedFX(0), + _NumInstances(0), + _Scene(NULL) { H_AUTO_USE(RZ_GroundFXManager) // Construct @@ -1037,4 +1038,4 @@ NLMISC_COMMAND(gfxStopAll, "gfxStopAll", "<>") return true; } -#endif +#endif \ No newline at end of file diff --git a/code/ryzom/client/src/hair_set.cpp b/code/ryzom/client/src/hair_set.cpp index e7c4a1692..3860651ba 100644 --- a/code/ryzom/client/src/hair_set.cpp +++ b/code/ryzom/client/src/hair_set.cpp @@ -116,8 +116,8 @@ CHairSet::EPeople CHairSet::convPeople(EGSPD::CPeople::TPeople people) case EGSPD::CPeople::Matis: return Matis; case EGSPD::CPeople::Tryker: return Tryker; case EGSPD::CPeople::Zorai: return Zorai; + default: return DontKnow; } - return DontKnow; } //========================================================================= @@ -158,4 +158,3 @@ EGSPD::CPeople::TPeople CHairSet::getPeopleFromHairItemID(uint id) const return EGSPD::CPeople::EndPeople; } - diff --git a/code/ryzom/client/src/interface_v3/inventory_manager.h b/code/ryzom/client/src/interface_v3/inventory_manager.h index 4fe7fb918..4378f9054 100644 --- a/code/ryzom/client/src/interface_v3/inventory_manager.h +++ b/code/ryzom/client/src/interface_v3/inventory_manager.h @@ -452,7 +452,7 @@ private: class CDBForageQQObs : public ICDBNode::IPropertyObserver { public: - CDBForageQQObs() : WhichOne(~0), FullValue(0.0f), ICDBNode::IPropertyObserver() {} + CDBForageQQObs() : ICDBNode::IPropertyObserver(), WhichOne(~0), FullValue(0.0f) {} virtual void update(ICDBNode *node); uint WhichOne; float FullValue; @@ -794,4 +794,3 @@ public: #endif // RY_INVENTORY_MANAGER_H /* End of inventory_manager.h */ - diff --git a/code/ryzom/client/src/interface_v3/obs_huge_list.h b/code/ryzom/client/src/interface_v3/obs_huge_list.h index 931ec39dd..d23ebc2a6 100644 --- a/code/ryzom/client/src/interface_v3/obs_huge_list.h +++ b/code/ryzom/client/src/interface_v3/obs_huge_list.h @@ -158,11 +158,11 @@ private: SlotType(NULL), Quality(NULL), SheetIDOrSkill(NULL), - Price(NULL), LogicTextID(NULL), DescTextID(NULL), - MissionDetailText(NULL), + Price(NULL), MissionText(NULL), + MissionDetailText(NULL), MissionIcon(NULL), MissionPreReqState(NULL), Weight(NULL), @@ -276,4 +276,4 @@ private: CCDBNodeLeaf *_RoleMasterRaceDB; }; -#endif +#endif \ No newline at end of file diff --git a/code/ryzom/client/src/interface_v3/people_list.h b/code/ryzom/client/src/interface_v3/people_list.h index cfedbe418..34960ef56 100644 --- a/code/ryzom/client/src/interface_v3/people_list.h +++ b/code/ryzom/client/src/interface_v3/people_list.h @@ -136,7 +136,7 @@ public: private: struct CPeople { - CPeople() : Online(ccs_offline), Blocked(false), Container(NULL), Chat(NULL), ContactId(0) {} + CPeople() : Container(NULL), Chat(NULL), Online(ccs_offline), Blocked(false), ContactId(0) {} NLMISC::CRefPtr Container; // todo : replace this with a CChatWindow one day, for consistency NLMISC::CRefPtr Chat; uint GlobalID; @@ -167,4 +167,4 @@ private: virtual void childrenMoved(uint srcIndex, uint destIndex, CGroupContainer *children); }; -#endif +#endif \ No newline at end of file diff --git a/code/ryzom/client/src/libwww.cpp b/code/ryzom/client/src/libwww.cpp index 5e55d933e..7e4a2b4fd 100644 --- a/code/ryzom/client/src/libwww.cpp +++ b/code/ryzom/client/src/libwww.cpp @@ -55,7 +55,7 @@ struct _HText // Here, modify the DTD table to change the HTML parser (add new tags for examples) #undef HTML_ATTR -#define HTML_ATTR(a,b) { #b } +#define HTML_ATTR(a,b) { (char*) #b } HTAttr a_attr[] = { @@ -551,7 +551,7 @@ void initLibWWW() // HTCacheInit(NULL, 20); /* Setup up transfer coders */ - HTFormat_addTransferCoding("chunked", HTChunkedEncoder, HTChunkedDecoder, 1.0); + HTFormat_addTransferCoding((char*)"chunked", HTChunkedEncoder, HTChunkedDecoder, 1.0); /* Setup MIME stream converters */ HTFormat_addConversion("message/rfc822", "*/*", HTMIMEConvert, 1.0, 0.0, 0.0); @@ -630,8 +630,8 @@ void initLibWWW() {"authentication-info", &HTMIME_authenticationInfo}, {"proxy-authentication-info", &HTMIME_proxyAuthenticationInfo} }; - int i; - for (i = 0; i < sizeof(fixedHandlers)/sizeof(fixedHandlers[0]); i++) + + for (uint i = 0; i < sizeof(fixedHandlers)/sizeof(fixedHandlers[0]); i++) HTHeader_addParser(fixedHandlers[i].string, NO, fixedHandlers[i].pHandler); /* Set up default event loop */ @@ -689,4 +689,3 @@ void initLibWWW() } // *************************************************************************** - diff --git a/code/ryzom/client/src/light_cycle_manager.cpp b/code/ryzom/client/src/light_cycle_manager.cpp index 2cbc0a6e1..3a3d1863b 100644 --- a/code/ryzom/client/src/light_cycle_manager.cpp +++ b/code/ryzom/client/src/light_cycle_manager.cpp @@ -96,15 +96,16 @@ float CLightCycleDesc::getDawnTransitionLength() const } //----------------------------------------------- -CLightCycleManager::CLightCycleManager() : _Touched(true), - _ValidDesc(false), - _LightLevel(0), - _WeatherLighting(0), - _LastWeatherLighting(0), - _Hour(0), - _UpdateFreq(0), - _State(StateUnknown), - _PrevState(StateUnknown) +CLightCycleManager::CLightCycleManager() : + _Hour(0), + _Touched(true), + _ValidDesc(false), + _LightLevel(0), + _WeatherLighting(0), + _LastWeatherLighting(0), + _UpdateFreq(0), + _State(StateUnknown), + _PrevState(StateUnknown) { H_AUTO_USE(RZ_LightCycleManager) } @@ -579,4 +580,4 @@ void CLightCycleManager::setupDayToNightLight(NL3D::UScene &scene, const CDirLig scene ); } -} +} \ No newline at end of file diff --git a/code/ryzom/client/src/login_patch.h b/code/ryzom/client/src/login_patch.h index 8baaf9014..06c5462bd 100644 --- a/code/ryzom/client/src/login_patch.h +++ b/code/ryzom/client/src/login_patch.h @@ -64,7 +64,7 @@ class CInstallThreadEntry public: CInstallThreadEntry(){ Timestamp = 0; } CInstallThreadEntry(const char* patchName, const char* sourceName, uint32 timestamp, const char* extractPath, uint32 size, uint32 sZipFileSize) - :PatchName(patchName), SourceName(sourceName), Timestamp(timestamp),ExtractPath(extractPath), Size(size),SZipFileSize(sZipFileSize){} + :PatchName(patchName), SourceName(sourceName), Timestamp(timestamp),Size(size),SZipFileSize(sZipFileSize),ExtractPath(extractPath) {} std::string PatchName; std::string SourceName; uint32 Timestamp; @@ -609,4 +609,4 @@ private: #endif // CL_PATCH_H -/* End of login_patch.h */ +/* End of login_patch.h */ \ No newline at end of file diff --git a/code/ryzom/client/src/main_loop.cpp b/code/ryzom/client/src/main_loop.cpp index 8ec376b68..21e4934db 100644 --- a/code/ryzom/client/src/main_loop.cpp +++ b/code/ryzom/client/src/main_loop.cpp @@ -2568,6 +2568,9 @@ bool mainLoop() screenShotPNG(); ScreenshotRequest = ScreenshotRequestNone; break; + case ScreenshotRequestNone: + nlwarning("Screenshot of unspecified type requested."); + break; } // TMP TMP @@ -4593,4 +4596,4 @@ void inGamePatchUncompleteWarning() im->messageBoxWithHelp(CI18N::get("uiBGD_InGamePatchIncomplete")); im->displaySystemInfo(CI18N::get("uiBGD_InGamePatchIncompleteBC"), "BC"); */ -} +} \ No newline at end of file diff --git a/code/ryzom/client/src/misc.cpp b/code/ryzom/client/src/misc.cpp index 90ad18da9..02b570dd9 100644 --- a/code/ryzom/client/src/misc.cpp +++ b/code/ryzom/client/src/misc.cpp @@ -656,8 +656,8 @@ bool isUserColorSupported(const CPlayerSheet &playerSheet, SLOTTYPE::EVisualSlot case SLOTTYPE::FEET_SLOT: return isUserColorSupported(playerSheet.Feet); case SLOTTYPE::RIGHT_HAND_SLOT: return isUserColorSupported(playerSheet.ObjectInRightHand); case SLOTTYPE::LEFT_HAND_SLOT: return isUserColorSupported(playerSheet.ObjectInLeftHand); + default: return false; } - return false; }// isUserColorSupported // @@ -1081,6 +1081,10 @@ void setCase (ucstring &str, TCaseMode mode) } } break; + case CaseNormal: + break; + case CaseCount: + break; } } @@ -1483,4 +1487,3 @@ uint getCurrentColorDepth() return depth; } - diff --git a/code/ryzom/client/src/npc_icon.cpp b/code/ryzom/client/src/npc_icon.cpp index b7cd23ab8..788e5320f 100644 --- a/code/ryzom/client/src/npc_icon.cpp +++ b/code/ryzom/client/src/npc_icon.cpp @@ -41,7 +41,7 @@ extern CNetManager NetMngr; // #pragma optimize ("", off) -CNPCIconCache::CNPCIconCache() : _LastTimerUpdateTimestamp(0), _LastRequestTimestamp(0), _Enabled(true) +CNPCIconCache::CNPCIconCache() : _LastRequestTimestamp(0), _LastTimerUpdateTimestamp(0), _Enabled(true) { _Icons[NPC_ICON::IconNone].init("", ""); _Icons[NPC_ICON::IconNotAMissionGiver].init("", ""); @@ -496,4 +496,4 @@ NLMISC_COMMAND(queryMissionGiverData, "Query mission giver data for the specifie #endif -//#pragma optimize ("", on) +//#pragma optimize ("", on) \ No newline at end of file diff --git a/code/ryzom/client/src/precipitation.cpp b/code/ryzom/client/src/precipitation.cpp index 76017b2ac..472d76598 100644 --- a/code/ryzom/client/src/precipitation.cpp +++ b/code/ryzom/client/src/precipitation.cpp @@ -35,7 +35,7 @@ static const float DEFAUT_PRECIPITATION_TIMEOUT = 10.f; // at most 10 second bef //============================================================ -CPrecipitation::CPrecipitation() : _Strenght(0), _XSize(0), _YSize(0), _ClipGrid(NULL), _Touched(false), _OldX(0), _OldY(0), _TimeOut(0.f) +CPrecipitation::CPrecipitation() : _ClipGrid(NULL), _Strenght(0), _TimeOut(0.f), _XSize(0), _YSize(0), _OldX(0), _OldY(0), _Touched(false) { H_AUTO_USE(RZ_Precipitation) } @@ -316,4 +316,4 @@ void CPrecipitation::drawClipGrid(NL3D::UDriver &drv) const { if (!_ClipGrid) return; _ClipGrid->display(drv); -} +} \ No newline at end of file diff --git a/code/ryzom/client/src/property_decoder.h b/code/ryzom/client/src/property_decoder.h index ae68296e3..076be0966 100644 --- a/code/ryzom/client/src/property_decoder.h +++ b/code/ryzom/client/src/property_decoder.h @@ -87,7 +87,7 @@ public: uint16& associationBits( CLFECOMMON::TCLEntityId entity ) { return _Entities[entity].AssociationBits; } bool isUsed(CLFECOMMON::TCLEntityId entity) const { return _Entities[entity].EntryUsed; } - const CLFECOMMON::TSheetId sheet(CLFECOMMON::TCLEntityId entity) const { return _Entities[entity].Sheet; } + CLFECOMMON::TSheetId sheet(CLFECOMMON::TCLEntityId entity) const { return _Entities[entity].Sheet; } /** Receives actions from the front end. Actually transmits actions received @@ -127,4 +127,4 @@ public: #endif // NL_PROPERTY_DECODER_H -/* End of property_decoder.h */ +/* End of property_decoder.h */ \ No newline at end of file diff --git a/code/ryzom/client/src/rosace.cpp b/code/ryzom/client/src/rosace.cpp index a5e91dd96..5e097a74f 100644 --- a/code/ryzom/client/src/rosace.cpp +++ b/code/ryzom/client/src/rosace.cpp @@ -242,6 +242,9 @@ void CRosacePage::update(float x, float y, TMode mode) case DirectMode: directMode(x, y); break; + case NbRosaceMode: + nlwarning("Rosace Mode reached."); + break; } }// update // @@ -553,4 +556,4 @@ void CRosace::swap() { if(valide()) _Contexts[_Selected].next(); -}// swap // +}// swap // \ No newline at end of file diff --git a/code/ryzom/client/src/seven_zip/LzmaDecode.cpp b/code/ryzom/client/src/seven_zip/LzmaDecode.cpp index c45150bad..630ddba00 100644 --- a/code/ryzom/client/src/seven_zip/LzmaDecode.cpp +++ b/code/ryzom/client/src/seven_zip/LzmaDecode.cpp @@ -126,8 +126,8 @@ int LzmaDecodeProperties(CLzmaProperties *propsRes, const unsigned char *propsDa if (prop0 >= (9 * 5 * 5)) return LZMA_RESULT_DATA_ERROR; { - for (propsRes->pb = 0; prop0 >= (9 * 5); propsRes->pb++, prop0 -= (9 * 5)); - for (propsRes->lp = 0; prop0 >= 9; propsRes->lp++, prop0 -= 9); + for (propsRes->pb = 0; prop0 >= (9 * 5); propsRes->pb++, prop0 -= (9 * 5)) ; + for (propsRes->lp = 0; prop0 >= 9; propsRes->lp++, prop0 -= 9) ; propsRes->lc = prop0; /* unsigned char remainder = (unsigned char)(prop0 / 9); @@ -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/sound_manager.cpp b/code/ryzom/client/src/sound_manager.cpp index 756b1c326..12f89c129 100644 --- a/code/ryzom/client/src/sound_manager.cpp +++ b/code/ryzom/client/src/sound_manager.cpp @@ -116,9 +116,9 @@ enum TFilterMapping // constructor //----------------------------------------------- CSoundManager::CSoundManager(IProgressCallback * /* progressCallBack */) -: _UserEntitySoundLevel(1.0f), - _AudioMixer(NULL), - _EnvSoundRoot(NULL) +: _AudioMixer(NULL), + _EnvSoundRoot(NULL), + _UserEntitySoundLevel(1.0f) { _EnableBackgroundMusicAtTime= 0; _GameMusicVolume= 1.f; @@ -1288,6 +1288,9 @@ void CSoundManager::update () _BackgroundFlags.Flags[MORNING] = false; _BackgroundFlags.Flags[DUSK] = true; break; + case CLightCycleManager::StateUnknown: + nlwarning("Unknown light cycle state reached."); + break; } // update the filter for season. @@ -1318,6 +1321,8 @@ void CSoundManager::update () _BackgroundFlags.Flags[AUTUMN] = false; _BackgroundFlags.Flags[WINTER] = true; break; + default: + nlwarning("Updating unknown season."); } // TODO : update the filter state for weather effet CWeatherState weatherState = WeatherManager.getCurrWeatherState(); @@ -1856,4 +1861,3 @@ bool CMaterialStepSounds::getSounds( TMoveType moveType, bool soft, vectorgetValue32()) == mountEntity->dataSetId() ) { CCDBNodeLeaf *hungerLeaf = safe_cast(beastNode->getNode( ICDBNode::CTextId( "HUNGER" ) )); - return (hungerLeaf->getValue32() != ANIMAL_TYPE::DbHungryValue); + return (hungerLeaf->getValue32() != (sint)ANIMAL_TYPE::DbHungryValue); } } return false; @@ -3751,7 +3755,7 @@ void CUserEntity::extractRM() CSPhraseManager *pm = CSPhraseManager::getInstance(); uint index; uint memoryLine; - bool autoFindPhrase = (_MoveToPhraseMemoryLine == ~0); + bool autoFindPhrase = (_MoveToPhraseMemoryLine == (uint)~0); if ( ! autoFindPhrase ) { // Use clicked phrase @@ -3781,7 +3785,7 @@ void CUserEntity::extractRM() } } - if ( memoryLine != ~0 ) + if ( memoryLine != (uint)~0 ) { // Open the forage (but not for care actions). Necessary for the case of redoing an extraction after a Drop All on the same source. uint32 phraseId = pm->getMemorizedPhrase( memoryLine, index ); @@ -4391,4 +4395,4 @@ void CUserEntity::trader(const CLFECOMMON::TCLEntityId &slot) EntitiesMngr.refreshInsceneInterfaceOfFriendNPC(prevTrader); if (_Trader != CLFECOMMON::INVALID_SLOT) EntitiesMngr.refreshInsceneInterfaceOfFriendNPC(_Trader); -} +} \ No newline at end of file diff --git a/code/ryzom/client/src/water_env_map_rdr.h b/code/ryzom/client/src/water_env_map_rdr.h index b86df2185..58b1b2868 100644 --- a/code/ryzom/client/src/water_env_map_rdr.h +++ b/code/ryzom/client/src/water_env_map_rdr.h @@ -47,7 +47,7 @@ public: NL3D::TGlobalAnimationTime CurrTime; CSky *Sky; public: - CWaterEnvMapRdr() : _LastRenderStartTime(-1), CurrTime(-1) + CWaterEnvMapRdr() : CurrTime(-1), _LastRenderStartTime(-1) { _CurrCanopyCamPos = CVector::Null; } @@ -63,4 +63,4 @@ private: -#endif +#endif \ No newline at end of file diff --git a/code/ryzom/common/src/game_share/bnp_patch.cpp b/code/ryzom/common/src/game_share/bnp_patch.cpp index 3c59f4ba8..4a4643be6 100644 --- a/code/ryzom/common/src/game_share/bnp_patch.cpp +++ b/code/ryzom/common/src/game_share/bnp_patch.cpp @@ -190,7 +190,9 @@ bool CBNPFileVersion::operator!=(const CBNPFileVersion& other) const PROP(uint32,_PatchSize) \ PROP_VECT(uint32,_HashKey) -#pragma message( PERSISTENT_GENERATION_MESSAGE ) +#ifdef NL_OS_WINDOWS +# pragma message( PERSISTENT_GENERATION_MESSAGE ) +#endif // NL_OS_WINDOWS #include "persistent_data_template.h" #undef PERSISTENT_CLASS @@ -340,7 +342,9 @@ bool CBNPFile::isIncremental() PROP(std::string,_FileName)\ STRUCT_VECT(_Versions) -#pragma message( PERSISTENT_GENERATION_MESSAGE ) +#ifdef NL_OS_WINDOWS +# pragma message( PERSISTENT_GENERATION_MESSAGE ) +#endif // NL_OS_WINDOWS #include "persistent_data_template.h" #undef PERSISTENT_CLASS @@ -453,8 +457,9 @@ void CBNPFileSet::addFile(const std::string& fileName,bool isIncremental) #define PERSISTENT_CLASS CBNPFileSet #define PERSISTENT_DATA\ STRUCT_VECT(_Files) - -#pragma message( PERSISTENT_GENERATION_MESSAGE ) +#ifdef NL_OS_WINDOWS +# pragma message( PERSISTENT_GENERATION_MESSAGE ) +#endif // NL_OS_WINDOWS #include "persistent_data_template.h" #undef PERSISTENT_CLASS @@ -574,7 +579,9 @@ void CBNPCategory::addFile(const std::string& fileName) LPROP(bool, _Hidden, if(_Hidden))\ PROP_VECT(std::string, _Files)\ -#pragma message( PERSISTENT_GENERATION_MESSAGE ) +#ifdef NL_OS_WINDOWS +# pragma message( PERSISTENT_GENERATION_MESSAGE ) +#endif // NL_OS_WINDOWS #include "persistent_data_template.h" #undef PERSISTENT_CLASS @@ -724,8 +731,9 @@ bool CBNPCategorySet::isFileIncremental(const std::string& fileName) const #define PERSISTENT_CLASS CBNPCategorySet #define PERSISTENT_DATA\ STRUCT_VECT(_Category) - -#pragma message( PERSISTENT_GENERATION_MESSAGE ) +#ifdef NL_OS_WINDOWS +# pragma message( PERSISTENT_GENERATION_MESSAGE ) +#endif // NL_OS_WINDOWS #include "persistent_data_template.h" #undef PERSISTENT_CLASS @@ -814,7 +822,9 @@ void CProductDescriptionForClient::serial(NLMISC::IStream &f) STRUCT(_Files)\ STRUCT(_Categories) -#pragma message( PERSISTENT_GENERATION_MESSAGE ) +#ifdef NL_OS_WINDOWS +# pragma message( PERSISTENT_GENERATION_MESSAGE ) +#endif //NL_OS_WINDOWS #include "persistent_data_template.h" #undef PERSISTENT_CLASS @@ -1169,4 +1179,3 @@ void CProductDescriptionForClient::serial(NLMISC::IStream &f) // // //#endif - diff --git a/code/ryzom/common/src/game_share/dir_light_setup.cpp b/code/ryzom/common/src/game_share/dir_light_setup.cpp index 0485d5d93..1f7998d5e 100644 --- a/code/ryzom/common/src/game_share/dir_light_setup.cpp +++ b/code/ryzom/common/src/game_share/dir_light_setup.cpp @@ -26,11 +26,10 @@ //----------------------------------------------- CDirLightSetup::CDirLightSetup() : Ambiant(0, 0, 0), + Diffuse(255, 255, 255), Specular(0, 0, 0), - Diffuse(255, 255, 255), - Direction(1.f, 0.f, 0.f) + Direction(1.f, 0.f, 0.f) { - // } //----------------------------------------------- @@ -89,4 +88,3 @@ bool CDirLightSetup::build(const NLGEORGES::UFormElm &item) return true; } - diff --git a/code/ryzom/common/src/game_share/generic_xml_msg_mngr.cpp b/code/ryzom/common/src/game_share/generic_xml_msg_mngr.cpp index 2e30a4cd8..b82c44d80 100644 --- a/code/ryzom/common/src/game_share/generic_xml_msg_mngr.cpp +++ b/code/ryzom/common/src/game_share/generic_xml_msg_mngr.cpp @@ -177,7 +177,7 @@ void CGenericXmlMsgHeaderManager::popNameAndDescriptionFromStream(string &result /* * Constructor */ -CGenericXmlMsgHeaderManager::CNode::CNode(xmlNodePtr xmlNode, uint32 value) : Value(value), NbBits(0), Callback(NULL), UseCycle(false) +CGenericXmlMsgHeaderManager::CNode::CNode(xmlNodePtr xmlNode, uint32 value) : Value(value), UseCycle(false), NbBits(0), Callback(NULL) { UserData[0] = 0; UserData[1] = 0; @@ -346,4 +346,4 @@ CGenericXmlMsgHeaderManager::CNode::~CNode() delete Nodes[i]; Nodes[i] = NULL; } -} +} \ No newline at end of file diff --git a/code/ryzom/common/src/game_share/mirror_prop_value.h b/code/ryzom/common/src/game_share/mirror_prop_value.h index 9674a1d9e..ebb34f195 100644 --- a/code/ryzom/common/src/game_share/mirror_prop_value.h +++ b/code/ryzom/common/src/game_share/mirror_prop_value.h @@ -1296,7 +1296,7 @@ public: protected: /// Default constructor - CMirrorPropValueList() : _PtFront(NULL), _Container(NULL), _PropLocation() {} + CMirrorPropValueList() : _Container(NULL), _PtFront(NULL), _PropLocation() {} TSharedListRow allocateNewCell(); @@ -1319,4 +1319,4 @@ protected: #endif // NL_MIRROR_PROP_VALUE_H -/* End of mirror_prop_value.h */ +/* End of mirror_prop_value.h */ \ No newline at end of file diff --git a/code/ryzom/common/src/game_share/server_edition_module.cpp b/code/ryzom/common/src/game_share/server_edition_module.cpp index 940f013a0..a7a6f4ed9 100644 --- a/code/ryzom/common/src/game_share/server_edition_module.cpp +++ b/code/ryzom/common/src/game_share/server_edition_module.cpp @@ -141,7 +141,7 @@ namespace R2 public: CCurrentChar(TCharId charId, uint32 editSlotId, const R2::TUserRole& userRole = R2::TUserRole::ur_editor) - :_CharId(charId), _EditSlotId(editSlotId), _UserRole(userRole){} + :_EditSlotId(editSlotId), _CharId(charId), _UserRole(userRole){} void setUserRole(const R2::TUserRole& userRole) { @@ -256,7 +256,7 @@ namespace R2 { public: CTaskUpdateScenarioVision(NLMISC::TTime now, CServerEditionModule* module, TSessionId sessionId) - :CTask(now), _Module(module),_SessionId(sessionId){} + :CTask(now), _SessionId(sessionId), _Module(module){} virtual void doOperation() { _Module->updateScenarioVision(_SessionId); @@ -340,7 +340,7 @@ namespace R2 public: CKickPlayerIfStillConnected(NLMISC::TTime taskDate, CServerEditionModule* serverEditionModule, TSessionId sessionId, TCharId charId) - : CTask(taskDate),_ServerEditionModule(serverEditionModule), _SessionId(sessionId), _CharId(charId) + : CTask(taskDate),_ServerEditionModule(serverEditionModule), _CharId(charId), _SessionId(sessionId) { } @@ -374,7 +374,7 @@ namespace R2 typedef uint32 TCharId; public: CVerifyRingAccess(NLMISC::TTime taskDate, CServerEditionModule* serverEditionModule, TSessionId sessionId, TCharId charId) - :CTask(taskDate),_ServerEditionModule(serverEditionModule), _SessionId(sessionId), _CharId(charId) + :CTask(taskDate),_ServerEditionModule(serverEditionModule), _CharId(charId), _SessionId(sessionId) { } @@ -764,7 +764,7 @@ _Scenario(scenario), SessionId(sessionId), _AiInstance(aiInstanceId),_EditSlotId CEditionSession::CEditionSession(RSMGR::TSessionType sessionType, TSessionId sessionId, CEditionSession* edit) -:_EditSlotIdMaker(1), SessionId(sessionId) +: SessionId(sessionId), _EditSlotIdMaker(1) { IsAnimationStopped = false; DateSinceNoPlayer = 0; @@ -6371,4 +6371,3 @@ void CServerEditionModule::forwardToDss(NLNET::IModuleProxy *senderModuleProxy, onReceiveModuleMessage(senderModuleProxy, message); } - diff --git a/code/ryzom/common/src/game_share/server_edition_module.h b/code/ryzom/common/src/game_share/server_edition_module.h index c069af47c..c98eeb586 100644 --- a/code/ryzom/common/src/game_share/server_edition_module.h +++ b/code/ryzom/common/src/game_share/server_edition_module.h @@ -647,4 +647,4 @@ namespace R2 } // namespace R2 -#endif // R2_SERVER_EDITION_MODULE_H +#endif // R2_SERVER_EDITION_MODULE_H \ No newline at end of file diff --git a/code/ryzom/common/src/game_share/sp_type.cpp b/code/ryzom/common/src/game_share/sp_type.cpp index afec52354..1ab59ed04 100644 --- a/code/ryzom/common/src/game_share/sp_type.cpp +++ b/code/ryzom/common/src/game_share/sp_type.cpp @@ -21,7 +21,7 @@ namespace EGSPD { -static const struct { char* Name; CSPType::TSPType Value; } TSPTypeConvert[] = +static const struct { const char* Name; CSPType::TSPType Value; } TSPTypeConvert[] = { { "Fight", CSPType::Fight }, { "Magic", CSPType::Magic }, @@ -51,4 +51,4 @@ std::map CSPType::_ValueMap; // End of static implementation of CSPType -} // End of EGSPD +} // End of EGSPD \ No newline at end of file diff --git a/code/ryzom/common/src/game_share/time_weather_season/weather_function_params_sheet_base.cpp b/code/ryzom/common/src/game_share/time_weather_season/weather_function_params_sheet_base.cpp index 4f019717a..697fd50eb 100644 --- a/code/ryzom/common/src/game_share/time_weather_season/weather_function_params_sheet_base.cpp +++ b/code/ryzom/common/src/game_share/time_weather_season/weather_function_params_sheet_base.cpp @@ -26,12 +26,13 @@ //======================================================================= -CWeatherFunctionParamsSheetBase::CWeatherFunctionParamsSheetBase() : CycleLenght(25), - DayLenght(24), - MinThunderPeriod(1.f), - ThunderLenght(0.5f), - CloudWindSpeedFactor(1.f), - CloudMinSpeed(0.f) +CWeatherFunctionParamsSheetBase::CWeatherFunctionParamsSheetBase() +: DayLenght(24), + CycleLenght(25), + MinThunderPeriod(1.f), + ThunderLenght(0.5f), + CloudWindSpeedFactor(1.f), + CloudMinSpeed(0.f) { } @@ -80,4 +81,3 @@ void CWeatherFunctionParamsSheetBase::build(const std::string &sheetName) NLGEORGES::UFormLoader::releaseLoader(loader); } - diff --git a/code/ryzom/common/src/game_share/time_weather_season/weather_setup_sheet_base.cpp b/code/ryzom/common/src/game_share/time_weather_season/weather_setup_sheet_base.cpp index 315035502..9a51321bc 100644 --- a/code/ryzom/common/src/game_share/time_weather_season/weather_setup_sheet_base.cpp +++ b/code/ryzom/common/src/game_share/time_weather_season/weather_setup_sheet_base.cpp @@ -39,10 +39,10 @@ CWeatherStateSheet::CWeatherStateSheet() : FogRatio(0), FogColorDay(NLMISC::CRGBA::Black), FogColorDusk(NLMISC::CRGBA::Black), FogColorNight(NLMISC::CRGBA::Black), + FogGradientFactor(1.f), Lighting(1.f), WindIntensity(0), - ThunderIntensity(0), - FogGradientFactor(1.f) + ThunderIntensity(0) { for(uint k = 0; k < NumFogType; ++k) @@ -210,4 +210,4 @@ void CWeatherSetupSheetBase::serial(class NLMISC::IStream &f) throw(NLMISC::EStr std::string setupName = NLMISC::CStringMapper::unmap(SetupName); f.serial(setupName); } -} +} \ No newline at end of file diff --git a/code/ryzom/common/src/game_share/type_skill_mod.cpp b/code/ryzom/common/src/game_share/type_skill_mod.cpp index a2318b20b..2a740ab31 100644 --- a/code/ryzom/common/src/game_share/type_skill_mod.cpp +++ b/code/ryzom/common/src/game_share/type_skill_mod.cpp @@ -43,5 +43,8 @@ PROP(sint32, Modifier)\ PROP2(Type, std::string, EGSPD::CClassificationType::toString(Type), Type=EGSPD::CClassificationType::fromString(val))\ -#pragma message( PERSISTENT_GENERATION_MESSAGE ) -#include "persistent_data_template.h" +#ifdef NL_OS_WINDOWS + #pragma message( PERSISTENT_GENERATION_MESSAGE ) +#endif // NL_OS_WINDOWS + +#include "persistent_data_template.h" \ No newline at end of file