Skip to content

Commit

Permalink
refactor: const correctness
Browse files Browse the repository at this point in the history
- Fix for newer pawn compiler.
  • Loading branch information
karimcambridge committed Apr 12, 2024
1 parent e6d9b7c commit b467daf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions foreach.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,7 @@ Notes:
Returns a random value from an iterator.
\*----------------------------------------------------------------------------*/

stock Iter_RandomInternal(count, array[], size)
stock Iter_RandomInternal(count, const array[], size)
{
if (count == 0)
{
Expand Down Expand Up @@ -1197,7 +1197,7 @@ Notes:
the data.
\*----------------------------------------------------------------------------*/

stock Iter_FreeInternal(array[], size)
stock Iter_FreeInternal(const array[], size)
{
for (new i = 0; i != size; ++i)
{
Expand Down Expand Up @@ -1334,7 +1334,7 @@ Notes:
Checks if this item is in the iterator.
\*----------------------------------------------------------------------------*/

stock Iter_ContainsInternal(array[], value, size)
stock Iter_ContainsInternal(const array[], value, size)
{
return 0 <= value < size && array[value] <= size;
}
Expand Down

0 comments on commit b467daf

Please sign in to comment.