AZ_Assert(driller->m_output==NULL,"Driller with id %08x is already have an output stream %p (currently we support only 1 at a time)",di.id,driller->m_output);
AZ_Assert(driller->m_output==nullptr,"Driller with id %08x is already have an output stream %p (currently we support only 1 at a time)",di.id,driller->m_output);
if(stream->GetCompressorData()!=NULL)// we already have compressor data
if(stream->GetCompressorData()!=nullptr)// we already have compressor data
{
returnfalse;
}
@ -347,7 +347,7 @@ namespace AZ
AZ_Assert(stream&&stream->GetCompressorData(),"This stream doesn't have compression enabled! Call Stream::WriteCompressed after you create the file!");
AZ_Assert(offset==SizeType(-1)||offset==stream->GetCurPos(),"We can write compressed data only at the end of the stream!");
m_lastReadStream=NULL;// invalidate last read position, otherwise m_dataBuffer will be corrupted (as we are about to write in it).
m_lastReadStream=nullptr;// invalidate last read position, otherwise m_dataBuffer will be corrupted (as we are about to write in it).
AZ_Assert(!zlibData->m_zlib.IsDecompressorStarted(),"You can't write while reading/decompressing a compressed stream!");
@ -398,13 +398,13 @@ namespace AZ
AZ_Assert(stream&&stream->GetCompressorData(),"This stream doesn't have compression enabled! Call Stream::WriteCompressed after you create the file!");
AZ_Warning("AZSystem",!Platform::IsWaitFailed(),"You are writing the ring buffer %s while the Global lock is NOT locked! This can lead to data corruption!",m_name);
AZ_Assert(m_info!=NULL,"You need to Create and Map the buffer first!");
AZ_Assert(m_info!=nullptr,"You need to Create and Map the buffer first!");
AZ_Warning("Math",skipWarnings,"Invalid UUID format %s (must be) {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} (or without dashes and braces)",string!=NULL?string:"null");
AZ_Warning("Math",skipWarnings,"Invalid UUID format %s (must be) {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} (or without dashes and braces)",string!=nullptr?string:"null");
m_desc.m_mapAllocator=&AllocatorInstance<SystemAllocator>::Get();// used as our sub allocator
}
AZ_Assert(m_desc.m_memoryBlockByteSize>0,"You must provide memory block size!");
AZ_Assert(m_desc.m_memoryBlock!=NULL,"You must provide memory block allocated as you with!");
AZ_Assert(m_desc.m_memoryBlock!=nullptr,"You must provide memory block allocated as you with!");
//if( m_desc.m_memoryBlock == NULL) there is no point to automate this cause we need to flag this memory special, otherwise there is no point to use this allocator at all
if(is_small_allocation(size))// no point to check m_isPoolAllocations as if it's false pointer can't be in a bucket.
@ -853,21 +853,21 @@ namespace AZ {
{
returnrealloc(ptr,size);
}
if(ptr==NULL)
if(ptr==nullptr)
{
returnalloc(size,alignment);
}
if(size==0)
{
free(ptr);
returnNULL;
returnnullptr;
}
if((size_t)ptr&(alignment-1))
{
void*newPtr=alloc(size,alignment);
if(!newPtr)
{
returnNULL;
returnnullptr;
}
size_tcount=this->size(ptr);
if(count>size)
@ -879,7 +879,7 @@ namespace AZ {
returnnewPtr;
}
debug_check(ptr);
void*newPtr=NULL;
void*newPtr=nullptr;
if(ptr_in_bucket(ptr))
{
if(is_small_allocation(size)&&alignment<=MAX_SMALL_ALLOCATION)// no point to check m_isPoolAllocations as if it was false, pointer can't be in a bucket
@ -931,7 +931,7 @@ namespace AZ {
// returns the size of the resulting memory block
inlinesize_tresize(void*ptr,size_tsize)
{
if(ptr==NULL)
if(ptr==nullptr)
{
return0;
}
@ -957,7 +957,7 @@ namespace AZ {
// query the size of the memory block
inlinesize_tsize(void*ptr)const
{
if(ptr==NULL)
if(ptr==nullptr)
{
return0;
}
@ -993,7 +993,7 @@ namespace AZ {
// free the memory block
inlinevoidfree(void*ptr)
{
if(ptr==NULL)
if(ptr==nullptr)
{
return;
}
@ -1009,7 +1009,7 @@ namespace AZ {
// free the memory block supplying the original size with DEFAULT_ALIGNMENT
inlinevoidfree(void*ptr,size_torigSize)
{
if(ptr==NULL)
if(ptr==nullptr)
{
return;
}
@ -1027,7 +1027,7 @@ namespace AZ {
// free the memory block supplying the original size and alignment
AZ_Assert((m_desc.m_fixedMemoryBlockByteSize&(m_desc.m_pageSize-1))==0,"Memory block size %d MUST be multiples of the of the page size %d!",m_desc.m_fixedMemoryBlockByteSize,m_desc.m_pageSize);
if(m_desc.m_fixedMemoryBlock==NULL)
if(m_desc.m_fixedMemoryBlock==nullptr)
{
AZ_Assert(m_desc.m_subAllocator!=NULL,"Sub allocator must point to a valid allocator if m_fixedMemoryBlock is NOT allocated (NULL)!");
AZ_Assert(m_desc.m_subAllocator!=nullptr,"Sub allocator must point to a valid allocator if m_fixedMemoryBlock is NOT allocated (NULL)!");
AZ_Assert(m_desc.m_fixedMemoryBlock!=NULL,"Failed to allocate %d bytes!",m_desc.m_fixedMemoryBlockByteSize);
AZ_Assert(m_desc.m_fixedMemoryBlock!=nullptr,"Failed to allocate %d bytes!",m_desc.m_fixedMemoryBlockByteSize);
m_ownMemoryBlock=true;
}
AZ_Assert((reinterpret_cast<size_t>(m_desc.m_fixedMemoryBlock)&static_cast<size_t>(desc.m_fixedMemoryBlockAlignment-1))==0,"Memory block must be page size (%d bytes) aligned!",desc.m_fixedMemoryBlockAlignment);
AZ_Printf("Memory","OSAllocator run out of system memory!\nWe can't track the debug allocator, since it's used for tracking and pipes trought the OS... here are the other allocator status:\n");
AZStd::array<BehaviorParameterMetadata,sizeof...(Args)+s_startNamedArgumentIndex>m_metadataParameters;///< Stores the per parameter metadata which is used to add names, tooltips, trait, default values, etc... to the parameters
};
#if __cpp_noexcept_function_type
// C++17 makes exception specifications as part of the type in paper P0012R1
// Therefore noexcept overloads must be distinguished from non-noexcept overloads
*// The AZ_EBUS_BEHAVIOR_BINDER defines FN_EventName for each index. You can also cache it yourself (but it's slower), static int cacheIndex = GetFunctionIndex("OnEvent1"); and use that .
*CallResult(result,FN_OnEvent1,data);// forward to the binding (there can be none, this is why we need to always have properly set result, when there is one)
*returnresult;// return the result like you will in any normal EBus even with result
*// The reason for needing parenthesis around the parameter name and tooltip object(AZ::BehaviorParameterOverrides) is to prevent the macro from parsing the comma in the intializer as seperate parameters
*// When using this macro, the BehaviorParameterOverrides objects must be placed after every listing a function as a handler. Furthermore the number of BehaviorParameterOverrides objects for each function must match the number of parameters
*// When using this macro, the BehaviorParameterOverrides objects must be placed after every listing a function as a handler. Furthermore the number of BehaviorParameterOverrides objects for each function must match the number of parameters
*// to that function
*// Ex. for a function called HugeEvent with a signature of void HugeEvent(int, float, double, char, short), two arguments must be supplied to the macro.