Browse Source

remove remaining this references + fix shared_ptr bug in WarenStorage + remove some unneccessary spaces

master
leo 2 years ago
parent
commit
cdc9546de9
  1. 5
      src/StorageEditor/StorageEditor.cpp

5
src/StorageEditor/StorageEditor.cpp

@ -3,7 +3,7 @@
StorageEditor::StorageEditor() { }
StorageEditor::StorageEditor(std::shared_ptr<WarenStorage> storage) {
this->storage = std::make_shared<WarenStorage>(new WarenStorage());
this->storage = storage;
}
std::shared_ptr<WarenStorage> StorageEditor::getWarenStorage() const {
@ -11,7 +11,8 @@ std::shared_ptr<WarenStorage> StorageEditor::getWarenStorage() const {
}
void StorageEditor::setWarenStorage(const WarenStorage storage) {
this->storage = std::make_shared<WarenStorage>(storage);
//move might be unnecessary here
this->storage = std::make_shared<WarenStorage>(std::move(storage));
}

Loading…
Cancel
Save