mirror of
https://github.com/Almamu/linux-wallpaperengine.git
synced 2025-09-14 13:56:48 +08:00
chore: do not use new to allocate the pretty printer
This commit is contained in:
parent
3806063b01
commit
c8124395eb
@ -382,15 +382,13 @@ void CWallpaperApplication::show () {
|
|||||||
static struct tm* timeinfo;
|
static struct tm* timeinfo;
|
||||||
|
|
||||||
if (this->m_context.settings.general.dumpStructure) {
|
if (this->m_context.settings.general.dumpStructure) {
|
||||||
auto* prettyPrinter = new PrettyPrinter::CPrettyPrinter ();
|
auto prettyPrinter = PrettyPrinter::CPrettyPrinter ();
|
||||||
|
|
||||||
for (const auto& [background, info] : this->m_renderContext->getWallpapers ()) {
|
for (const auto& [background, info] : this->m_renderContext->getWallpapers ()) {
|
||||||
prettyPrinter->printWallpaper (*info);
|
prettyPrinter.printWallpaper (*info);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cout << prettyPrinter->str () << std::endl;
|
std::cout << prettyPrinter.str () << std::endl;
|
||||||
|
|
||||||
delete prettyPrinter;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
while (this->m_context.state.general.keepRunning) {
|
while (this->m_context.state.general.keepRunning) {
|
||||||
|
Loading…
Reference in New Issue
Block a user