Skip to content

Commit

Permalink
tweak: clang format
Browse files Browse the repository at this point in the history
formatted all files except those that were in the scripting expansion
  • Loading branch information
ToeKneeRED committed Aug 21, 2024
1 parent 4b2fc01 commit 4563e3e
Show file tree
Hide file tree
Showing 9 changed files with 215 additions and 239 deletions.
5 changes: 4 additions & 1 deletion Code/client/Events/SetTimeCommandEvent.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
struct SetTimeCommandEvent
{
SetTimeCommandEvent() = delete;
SetTimeCommandEvent(uint8_t aHours, uint8_t aMinutes, uint32_t aPlayerId) : Hours(aHours), Minutes(aMinutes), PlayerId(aPlayerId)
SetTimeCommandEvent(uint8_t aHours, uint8_t aMinutes, uint32_t aPlayerId)
: Hours(aHours)
, Minutes(aMinutes)
, PlayerId(aPlayerId)
{
}

Expand Down
8 changes: 4 additions & 4 deletions Code/encoding/Messages/ClientMessageFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ struct ClientMessageFactory
{
auto s_visitor = CreateMessageVisitor<
AuthenticationRequest, AssignCharacterRequest, CancelAssignmentRequest, ClientReferencesMoveRequest, EnterInteriorCellRequest, RequestInventoryChanges, RequestFactionsChanges, RequestQuestUpdate, PartyInviteRequest, PartyAcceptInviteRequest, PartyLeaveRequest, PartyCreateRequest,
PartyChangeLeaderRequest, PartyKickRequest, RequestActorValueChanges, RequestActorMaxValueChanges, EnterExteriorCellRequest, RequestHealthChangeBroadcast, ActivateRequest, LockChangeRequest, AssignObjectsRequest, RequestDeathStateChange, ShiftGridCellRequest,
RequestOwnershipTransfer, RequestOwnershipClaim, RequestObjectInventoryChanges, SpellCastRequest, ProjectileLaunchRequest, InterruptCastRequest, AddTargetRequest, ScriptAnimationRequest, DrawWeaponRequest, MountRequest, NewPackageRequest, RequestRespawn, SyncExperienceRequest,
RequestEquipmentChanges, SendChatMessageRequest, TeleportCommandRequest, PlayerRespawnRequest, DialogueRequest, SubtitleRequest, PlayerDialogueRequest, PlayerLevelRequest, TeleportRequest, RequestPlayerHealthUpdate, RequestWeatherChange, RequestCurrentWeather, RequestSetWaypoint,
RequestRemoveWaypoint, SetTimeCommandRequest>;
PartyChangeLeaderRequest, PartyKickRequest, RequestActorValueChanges, RequestActorMaxValueChanges, EnterExteriorCellRequest, RequestHealthChangeBroadcast, ActivateRequest, LockChangeRequest, AssignObjectsRequest, RequestDeathStateChange, ShiftGridCellRequest, RequestOwnershipTransfer,
RequestOwnershipClaim, RequestObjectInventoryChanges, SpellCastRequest, ProjectileLaunchRequest, InterruptCastRequest, AddTargetRequest, ScriptAnimationRequest, DrawWeaponRequest, MountRequest, NewPackageRequest, RequestRespawn, SyncExperienceRequest, RequestEquipmentChanges,
SendChatMessageRequest, TeleportCommandRequest, PlayerRespawnRequest, DialogueRequest, SubtitleRequest, PlayerDialogueRequest, PlayerLevelRequest, TeleportRequest, RequestPlayerHealthUpdate, RequestWeatherChange, RequestCurrentWeather, RequestSetWaypoint, RequestRemoveWaypoint,
SetTimeCommandRequest>;

return s_visitor(std::forward<T>(func));
}
Expand Down
8 changes: 3 additions & 5 deletions Code/encoding/Messages/NotifySetTimeResult.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,15 @@ struct NotifySetTimeResult final : ServerMessage
{
static constexpr ServerOpcode Opcode = kNotifySetTimeResult;

NotifySetTimeResult() : ServerMessage(Opcode)
NotifySetTimeResult()
: ServerMessage(Opcode)
{
}

void SerializeRaw(TiltedPhoques::Buffer::Writer& aWriter) const noexcept override;
void DeserializeRaw(TiltedPhoques::Buffer::Reader& aReader) noexcept override;

bool operator==(const NotifySetTimeResult& achRhs) const noexcept
{
return GetOpcode() == achRhs.GetOpcode() && Result == achRhs.Result;
}
bool operator==(const NotifySetTimeResult& achRhs) const noexcept { return GetOpcode() == achRhs.GetOpcode() && Result == achRhs.Result; }

enum class SetTimeResult : uint8_t
{
Expand Down
4 changes: 2 additions & 2 deletions Code/encoding/Messages/ServerMessageFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ struct ServerMessageFactory
AuthenticationResponse, AssignCharacterResponse, ServerReferencesMoveRequest, ServerTimeSettings, CharacterSpawnRequest, NotifyInventoryChanges, StringCacheUpdate, NotifyFactionsChanges, NotifyRemoveCharacter, NotifyQuestUpdate, NotifyPlayerList, NotifyPartyInfo, NotifyPartyInvite,
NotifyActorValueChanges, NotifyPartyJoined, NotifyPartyLeft, NotifyActorMaxValueChanges, NotifyHealthChangeBroadcast, NotifySpawnData, NotifyActivate, NotifyLockChange, AssignObjectsResponse, NotifyDeathStateChange, NotifyOwnershipTransfer, NotifyObjectInventoryChanges, NotifySpellCast,
NotifyProjectileLaunch, NotifyInterruptCast, NotifyAddTarget, NotifyScriptAnimation, NotifyDrawWeapon, NotifyMount, NotifyNewPackage, NotifyRespawn, NotifySyncExperience, NotifyEquipmentChanges, NotifyChatMessageBroadcast, TeleportCommandResponse, NotifyPlayerRespawn, NotifyDialogue,
NotifySubtitle, NotifyPlayerDialogue, NotifyActorTeleport, NotifyRelinquishControl, NotifyPlayerLeft, NotifyPlayerJoined, NotifyDialogue, NotifySubtitle, NotifyPlayerDialogue, NotifyPlayerLevel, NotifyPlayerCellChanged, NotifyTeleport, NotifyPlayerHealthUpdate, NotifySettingsChange, NotifyWeatherChange, NotifySetWaypoint,
NotifyRemoveWaypoint, NotifySetTimeResult>;
NotifySubtitle, NotifyPlayerDialogue, NotifyActorTeleport, NotifyRelinquishControl, NotifyPlayerLeft, NotifyPlayerJoined, NotifyDialogue, NotifySubtitle, NotifyPlayerDialogue, NotifyPlayerLevel, NotifyPlayerCellChanged, NotifyTeleport, NotifyPlayerHealthUpdate, NotifySettingsChange,
NotifyWeatherChange, NotifySetWaypoint, NotifyRemoveWaypoint, NotifySetTimeResult>;

return s_visitor(std::forward<T>(func));
}
Expand Down
8 changes: 3 additions & 5 deletions Code/encoding/Messages/SetTimeCommandRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,15 @@ struct SetTimeCommandRequest final : ClientMessage
{
static constexpr ClientOpcode Opcode = kSetTimeCommandRequest;

SetTimeCommandRequest() : ClientMessage(Opcode)
SetTimeCommandRequest()
: ClientMessage(Opcode)
{
}

void SerializeRaw(TiltedPhoques::Buffer::Writer& aWriter) const noexcept override;
void DeserializeRaw(TiltedPhoques::Buffer::Reader& aReader) noexcept override;

bool operator==(const SetTimeCommandRequest& acRhs) const noexcept
{
return GetOpcode() == acRhs.GetOpcode() && Hours == acRhs.Hours && Minutes == acRhs.Minutes && PlayerId == acRhs.PlayerId;
}
bool operator==(const SetTimeCommandRequest& acRhs) const noexcept { return GetOpcode() == acRhs.GetOpcode() && Hours == acRhs.Hours && Minutes == acRhs.Minutes && PlayerId == acRhs.PlayerId; }

uint8_t Hours{};
uint8_t Minutes{};
Expand Down
1 change: 0 additions & 1 deletion Code/server/Game/PlayerManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ Player* PlayerManager::GetByUsername(const String& acUsername) const noexcept
return nullptr;
}


Player const* PlayerManager::GetByUsername(const String& acUsername) noexcept
{
auto itor = std::begin(m_players);
Expand Down
Loading

0 comments on commit 4563e3e

Please sign in to comment.