Important Update:
- Switch from malloc/free -> new/delete for structures - Bug fix: Move Parameter groups to Device (not class) - Update Parameter groups: - Update Read/Write indicators as params are added
This commit is contained in:
@@ -61,7 +61,7 @@ CFunctionCore::~CFunctionCore()
|
||||
free( FirstChannel->FirstInput->Name );
|
||||
}
|
||||
NextLinkedChannel = FirstChannel->FirstInput->Next;
|
||||
free( FirstChannel->FirstInput );
|
||||
delete FirstChannel->FirstInput;
|
||||
FirstChannel->FirstInput = NextLinkedChannel;
|
||||
}
|
||||
|
||||
@@ -71,13 +71,13 @@ CFunctionCore::~CFunctionCore()
|
||||
free( FirstChannel->FirstOutput->Name );
|
||||
}
|
||||
NextLinkedChannel = FirstChannel->FirstOutput->Next;
|
||||
free( FirstChannel->FirstOutput );
|
||||
delete FirstChannel->FirstOutput;
|
||||
FirstChannel->FirstOutput = NextLinkedChannel;
|
||||
}
|
||||
|
||||
// Destroy Channel
|
||||
NextChannel = FirstChannel->Next;
|
||||
free( FirstChannel );
|
||||
delete FirstChannel;
|
||||
FirstChannel = NextChannel;
|
||||
}
|
||||
|
||||
@@ -192,8 +192,7 @@ TChannel * CFunctionCore::AddChannel( const char * ChannelName, const bool pInpu
|
||||
// Create if not exist
|
||||
if (!*Channel) {
|
||||
// Create
|
||||
*Channel = (TChannel*)malloc( sizeof(TChannel) );
|
||||
memset( *Channel, 0, sizeof(TChannel) );
|
||||
*Channel = new TChannel;
|
||||
|
||||
// Set Name
|
||||
(*Channel)->Name = (char*)malloc( strlen(ChannelName)+1 );
|
||||
@@ -234,8 +233,7 @@ bool CFunctionCore::LinkInputChannel( const char * ChannelName, const char * Out
|
||||
if (!*LinkedChannel)
|
||||
{
|
||||
// Create
|
||||
*LinkedChannel = (TChannelLink*)malloc( sizeof(TChannelLink) );
|
||||
memset( *LinkedChannel, 0, sizeof( TChannelLink ));
|
||||
*LinkedChannel = new TChannelLink;
|
||||
|
||||
// Set Parameters
|
||||
(*LinkedChannel)->Function = OutFunction;
|
||||
@@ -280,8 +278,7 @@ bool CFunctionCore::LinkOutputChannel( const char * ChannelName, const char * In
|
||||
if (!*LinkedChannel)
|
||||
{
|
||||
// Create
|
||||
*LinkedChannel = (TChannelLink*)malloc( sizeof(TChannelLink) );
|
||||
memset( *LinkedChannel, 0, sizeof( TChannelLink ));
|
||||
*LinkedChannel = new TChannelLink;
|
||||
|
||||
// Set Parameters
|
||||
(*LinkedChannel)->Function = InFunction;
|
||||
|
||||
Reference in New Issue
Block a user