REfactored baseoperator to use smart pointer

This commit is contained in:
Alejandro Saucedo 2020-08-17 07:41:39 +01:00
parent e8b0cac2c7
commit 1ddd9f2bc4
3 changed files with 6 additions and 4 deletions

View file

@ -14,7 +14,7 @@ BaseOperator::BaseOperator() {
}
BaseOperator::BaseOperator(vk::CommandBuffer* commandBuffer) {
BaseOperator::BaseOperator(std::shared_ptr<vk::CommandBuffer> commandBuffer) {
SPDLOG_DEBUG("Compute BaseOperator constructor started");
this->mCommandBuffer = commandBuffer;
}

View file

@ -14,15 +14,15 @@ private:
public:
BaseOperator();
BaseOperator(vk::CommandBuffer* commandBuffer);
BaseOperator(std::shared_ptr<vk::CommandBuffer> commandBuffer);
virtual ~BaseOperator();
void init(std::string one, std::string two);
void record();
private:
vk::Device* mDevice;
vk::CommandBuffer* mCommandBuffer;
std::shared_ptr<vk::Device> mDevice;
std::shared_ptr<vk::CommandBuffer> mCommandBuffer;
};

View file

@ -21,6 +21,8 @@ private:
public:
Manager();
//Manager(std::shared_ptr<vk::Instance> instance, std::shared_ptr<vk::Device>, uint32_t queueIndex);
~Manager();
// Evaluate actions