use empty

This commit is contained in:
Aaron Kimbre 2024-06-03 22:28:37 -05:00
parent b56d077892
commit 2ef45bd7ee

View File

@ -324,7 +324,7 @@ namespace GMGreaterThanZeroCommands {
} }
void Spectate(Entity* entity, const SystemAddress& sysAddr, const std::string args) { void Spectate(Entity* entity, const SystemAddress& sysAddr, const std::string args) {
if (args.length() <= 0) GameMessages::SendSlashCommandFeedbackText(entity, u"No player Given"); if (args.empty()) GameMessages::SendSlashCommandFeedbackText(entity, u"No player Given");
auto player = PlayerManager::GetPlayer(args); auto player = PlayerManager::GetPlayer(args);
if (!player) GameMessages::SendSlashCommandFeedbackText(entity, u"Player not found"); if (!player) GameMessages::SendSlashCommandFeedbackText(entity, u"Player not found");
GameMessages::SendSlashCommandFeedbackText(entity, u"Spectating Player"); GameMessages::SendSlashCommandFeedbackText(entity, u"Spectating Player");