mirror of
https://github.com/isledecomp/isle.git
synced 2025-12-10 08:03:13 +00:00
Implement MxVideoManager::Destroy / destructor (#207)
* MxVideoManager::Destroy / destructor * Consistency * Add missing override
This commit is contained in:
committed by
GitHub
parent
f062543f87
commit
5ddfaab9e7
@@ -65,11 +65,11 @@ MxVideoParam &MxVideoParam::operator=(const MxVideoParam &p_videoParam)
|
||||
void MxVideoParam::SetDeviceName(char *id)
|
||||
{
|
||||
if (this->m_deviceId != 0)
|
||||
free(this->m_deviceId);
|
||||
delete[] this->m_deviceId;
|
||||
|
||||
if (id != 0)
|
||||
{
|
||||
this->m_deviceId = (char *)malloc(strlen(id) + 1);
|
||||
this->m_deviceId = new char[strlen(id) + 1];
|
||||
|
||||
if (this->m_deviceId != 0) {
|
||||
strcpy(this->m_deviceId, id);
|
||||
@@ -84,5 +84,5 @@ void MxVideoParam::SetDeviceName(char *id)
|
||||
MxVideoParam::~MxVideoParam()
|
||||
{
|
||||
if (this->m_deviceId != 0)
|
||||
free(this->m_deviceId);
|
||||
delete[] this->m_deviceId;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user