cleanup: Remove rak::call_delete

This commit is contained in:
stickz
2025-01-11 21:22:40 -05:00
parent 4a074adc7b
commit 9c92bfc7e2
9 changed files with 9 additions and 27 deletions
+1 -2
View File
@@ -36,7 +36,6 @@
#include "config.h"
#include <rak/functional.h>
#include <rak/string_manip.h>
#include <torrent/exceptions.h>
#include <torrent/chunk_manager.h>
@@ -100,7 +99,7 @@ Download::~Download() {
if (is_active())
throw torrent::internal_error("ui::Download::~Download() called on an active object.");
std::for_each(m_uiArray, m_uiArray + DISPLAY_MAX_SIZE, rak::call_delete<ElementBase>());
std::for_each(m_uiArray, m_uiArray + DISPLAY_MAX_SIZE, [](ElementBase* eb) { delete eb; });
delete m_windowDownloadStatus;
}
+1 -2
View File
@@ -38,7 +38,6 @@
#include <sstream>
#include <rak/functional.h>
#include <rak/string_manip.h>
#include <torrent/exceptions.h>
#include <torrent/torrent.h>
@@ -86,7 +85,7 @@ DownloadList::~DownloadList() {
if (is_active())
throw std::logic_error("ui::DownloadList::~DownloadList() called on an active object");
std::for_each(m_uiArray, m_uiArray + DISPLAY_MAX_SIZE, rak::call_delete<ElementBase>());
std::for_each(m_uiArray, m_uiArray + DISPLAY_MAX_SIZE, [](ElementBase* eb) { delete eb; });
delete m_windowLog;
}