mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-26 20:02:25 +01:00
Core/Misc: Use boost::in_place() to initialize optionals.
* Improves commit 800d5d8939
* Thanks @Shauren for this great suggestion.
This commit is contained in:
@@ -1135,7 +1135,7 @@ void WorldSession::SendFeatureSystemStatus()
|
||||
features.VoiceEnabled = false;
|
||||
features.BrowserEnabled = false; // Has to be false, otherwise client will crash if "Customer Support" is opened
|
||||
|
||||
features.EuropaTicketSystemStatus = WorldPackets::System::FeatureSystemStatus::EuropaTicketConfig();
|
||||
features.EuropaTicketSystemStatus = boost::in_place();
|
||||
features.EuropaTicketSystemStatus->ThrottleState.MaxTries = 10;
|
||||
features.EuropaTicketSystemStatus->ThrottleState.PerMilliseconds = 60000;
|
||||
features.EuropaTicketSystemStatus->ThrottleState.TryCount = 1;
|
||||
@@ -2583,7 +2583,7 @@ void WorldSession::SendCharFactionChange(ResponseCodes result, WorldPackets::Cha
|
||||
|
||||
if (result == RESPONSE_SUCCESS)
|
||||
{
|
||||
packet.Display = WorldPackets::Character::CharFactionChangeResult::CharFactionChangeDisplayInfo();
|
||||
packet.Display = boost::in_place();
|
||||
packet.Display->Name = factionChangeInfo->Name;
|
||||
packet.Display->SexID = factionChangeInfo->SexID;
|
||||
packet.Display->SkinID = *factionChangeInfo->SkinID;
|
||||
|
||||
Reference in New Issue
Block a user