Commit 71bfbe81 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

backends/virtual: Manage VirtualQPainterLayer using std::unique_ptr

parent 26d4a068
Pipeline #204423 failed with stage
in 26 minutes and 5 seconds
......@@ -61,12 +61,12 @@ VirtualQPainterBackend::~VirtualQPainterBackend() = default;
void VirtualQPainterBackend::addOutput(Output *output)
{
m_outputs.insert(output, std::make_shared<VirtualQPainterLayer>(output));
m_outputs[output] = std::make_unique<VirtualQPainterLayer>(output);
}
void VirtualQPainterBackend::removeOutput(Output *output)
{
m_outputs.remove(output);
m_outputs.erase(output);
}
void VirtualQPainterBackend::present(Output *output)
......
......@@ -50,7 +50,7 @@ private:
void addOutput(Output *output);
void removeOutput(Output *output);
QMap<Output *, std::shared_ptr<VirtualQPainterLayer>> m_outputs;
std::map<Output *, std::unique_ptr<VirtualQPainterLayer>> m_outputs;
VirtualBackend *m_backend;
int m_frameCounter = 0;
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment