Codechange: Use find_if to get default writeable saveload format. (#12849)

* Codechange: Use find_if to get default writeable savegame format.

This removes the last of lastof, and so the lastof macro is removed.
This commit is contained in:
Peter Nelson
2024-07-09 17:07:40 +01:00
committed by GitHub
parent 56b0eac2e9
commit 100dd7b6d1
3 changed files with 13 additions and 20 deletions

View File

@@ -285,14 +285,6 @@ char (&ArraySizeHelper(T (&array)[N]))[N];
*/
#define lengthof(array) (sizeof(ArraySizeHelper(array)))
/**
* Get the last element of an fixed size array.
*
* @param x The pointer to the first element of the array
* @return The pointer to the last element of the array
*/
#define lastof(x) (&x[lengthof(x) - 1])
/**
* Gets the size of a variable within a class.
* @param base The class the variable is in.