Skip to content

Commit 4e0ae0c

Browse files
authored
Change int[] to any[] for data r/w functions (#1221)
1 parent 611bad4 commit 4e0ae0c

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

plugins/include/entity.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,7 @@ native int GetEntPropArraySize(int entity, PropType type, const char[] prop);
715715
* @param dataSize Size of each value in bytes (1, 2, or 4).
716716
* @error Invalid entity or offset out of reasonable bounds.
717717
*/
718-
stock void GetEntDataArray(int entity, int offset, int[] array, int arraySize, int dataSize=4)
718+
stock void GetEntDataArray(int entity, int offset, any[] array, int arraySize, int dataSize=4)
719719
{
720720
for (int i = 0; i < arraySize; i++)
721721
{
@@ -734,7 +734,7 @@ stock void GetEntDataArray(int entity, int offset, int[] array, int arraySize, i
734734
* @param changeState True to set the network state as changed; false otherwise.
735735
* @error Invalid entity or offset out of reasonable bounds.
736736
*/
737-
stock void SetEntDataArray(int entity, int offset, const int[] array, int arraySize, int dataSize=4, bool changeState=false)
737+
stock void SetEntDataArray(int entity, int offset, const any[] array, int arraySize, int dataSize=4, bool changeState=false)
738738
{
739739
for (int i = 0; i < arraySize; i++)
740740
{

plugins/include/files.inc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ methodmap File < Handle
126126
// @param size Size of each element, in bytes, to be read.
127127
// Valid sizes are 1, 2, or 4.
128128
// @return Number of elements read, or -1 on error.
129-
public native int Read(int[] items, int num_items, int size);
129+
public native int Read(any[] items, int num_items, int size);
130130

131131
// Reads a UTF8 or ANSI string from a file.
132132
//
@@ -152,7 +152,7 @@ methodmap File < Handle
152152
// @param size Size of each item in the array in bytes.
153153
// Valid sizes are 1, 2, or 4.
154154
// @return True on success, false on error.
155-
public native bool Write(const int[] items, int num_items, int size);
155+
public native bool Write(const any[] items, int num_items, int size);
156156

157157
// Writes a binary string to a file.
158158
//
@@ -361,7 +361,7 @@ native bool ReadFileLine(Handle hndl, char[] buffer, int maxlength);
361361
* Valid sizes are 1, 2, or 4.
362362
* @return Number of elements read, or -1 on error.
363363
*/
364-
native int ReadFile(Handle hndl, int[] items, int num_items, int size);
364+
native int ReadFile(Handle hndl, any[] items, int num_items, int size);
365365

366366
/**
367367
* Reads a UTF8 or ANSI string from a file.
@@ -394,7 +394,7 @@ native int ReadFileString(Handle hndl, char[] buffer, int max_size, int read_cou
394394
* @return True on success, false on error.
395395
* @error Invalid Handle.
396396
*/
397-
native bool WriteFile(Handle hndl, const int[] items, int num_items, int size);
397+
native bool WriteFile(Handle hndl, const any[] items, int num_items, int size);
398398

399399
/**
400400
* Writes a binary string to a file.

0 commit comments

Comments
 (0)