From ef064ab2beb7560959ca85a78bd6d3bab7bea113 Mon Sep 17 00:00:00 2001 From: Anton Tarasenko Date: Sun, 28 Nov 2021 04:35:02 +0700 Subject: [PATCH] Rename `GetPlayers()` as `GetAll()` in PlayersAPI --- docs/objects.md | 2 +- sources/Players/PlayersAPI.uc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/objects.md b/docs/objects.md index 1a41f01..12c8305 100644 --- a/docs/objects.md +++ b/docs/objects.md @@ -44,7 +44,7 @@ not *hard rules*. ### Exceptions First guideline, for example, can be broken if returned object is supposed to -be shared: `_.players.GetPlayers()` returns `array` with references to +be shared: `_.players.GetAll()` returns `array` with references to *player objects* that aren't supposed to ever be deallocated. Similarly, Acedia's collections operate by different rules: they might still consider themselves responsible for objects returned with diff --git a/sources/Players/PlayersAPI.uc b/sources/Players/PlayersAPI.uc index d658044..8765847 100644 --- a/sources/Players/PlayersAPI.uc +++ b/sources/Players/PlayersAPI.uc @@ -83,7 +83,7 @@ public final function ConsoleWriter Console() * @return Current array of all players. * Guaranteed to not contain `none` values. */ -public final function array GetPlayers() +public final function array GetAll() { local PlayerService service; local array emptyResult;