backends/virtual: Manage VirtualQPainterLayer using std::unique_ptr
This commit is contained in:
parent
26d4a06818
commit
71bfbe815c
2 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue