mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-07-30 20:22:24 +00:00
chore: resolve some void* memset cast warnings
This commit is contained in:
parent
cdc08700e4
commit
ac9f3cbca3
|
|
@ -265,7 +265,7 @@ typedef struct _LaunchMoreOptionsMenuInitData
|
||||||
|
|
||||||
_LaunchMoreOptionsMenuInitData()
|
_LaunchMoreOptionsMenuInitData()
|
||||||
{
|
{
|
||||||
memset(this,0,sizeof(_LaunchMoreOptionsMenuInitData));
|
memset((void*)this,0,sizeof(_LaunchMoreOptionsMenuInitData));
|
||||||
bOnlineGame = TRUE;
|
bOnlineGame = TRUE;
|
||||||
bAllowFriendsOfFriends = TRUE;
|
bAllowFriendsOfFriends = TRUE;
|
||||||
bPVP = TRUE;
|
bPVP = TRUE;
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ public:
|
||||||
T *data;
|
T *data;
|
||||||
unsigned int length;
|
unsigned int length;
|
||||||
arrayWithLength() { data = NULL; length = 0; }
|
arrayWithLength() { data = NULL; length = 0; }
|
||||||
arrayWithLength(unsigned int elements, bool bClearArray=true) { assert(elements!=0); data = new T[elements]; if(bClearArray){ memset( data,0,sizeof(T)*elements); } this->length = elements; }
|
arrayWithLength(unsigned int elements, bool bClearArray=true) { assert(elements!=0); data = new T[elements]; if(bClearArray){ memset( (void*)data,0,sizeof(T)*elements); } this->length = elements; }
|
||||||
|
|
||||||
// 4J Stu Added this ctor so I static init arrays in the Item derivation tree
|
// 4J Stu Added this ctor so I static init arrays in the Item derivation tree
|
||||||
arrayWithLength( T data[], unsigned int elements) { this->data = data; this->length = elements; }
|
arrayWithLength( T data[], unsigned int elements) { this->data = data; this->length = elements; }
|
||||||
|
|
@ -22,7 +22,7 @@ public:
|
||||||
{
|
{
|
||||||
assert( elements > length );
|
assert( elements > length );
|
||||||
T *temp = new T[elements];
|
T *temp = new T[elements];
|
||||||
memset( temp,0,sizeof(T)*elements);
|
memset( (void*)temp,0,sizeof(T)*elements);
|
||||||
|
|
||||||
if( data != NULL )
|
if( data != NULL )
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue