From cdc9546de95240265264e51b923274bcadd9f7a1 Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 30 Mar 2022 11:58:42 +0200 Subject: [PATCH] remove remaining this references + fix shared_ptr bug in WarenStorage + remove some unneccessary spaces --- src/StorageEditor/StorageEditor.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/StorageEditor/StorageEditor.cpp b/src/StorageEditor/StorageEditor.cpp index 51898dd..315775f 100644 --- a/src/StorageEditor/StorageEditor.cpp +++ b/src/StorageEditor/StorageEditor.cpp @@ -3,7 +3,7 @@ StorageEditor::StorageEditor() { } StorageEditor::StorageEditor(std::shared_ptr storage) { - this->storage = std::make_shared(new WarenStorage()); + this->storage = storage; } std::shared_ptr StorageEditor::getWarenStorage() const { @@ -11,7 +11,8 @@ std::shared_ptr StorageEditor::getWarenStorage() const { } void StorageEditor::setWarenStorage(const WarenStorage storage) { - this->storage = std::make_shared(storage); + //move might be unnecessary here + this->storage = std::make_shared(std::move(storage)); }