diff options
author | Jeroen Bakker <jeroen@blender.org> | 2021-03-26 17:18:28 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-03-26 17:51:06 +0300 |
commit | 930b8a39326f39e87318c42437a5ec249d01dda4 (patch) | |
tree | e8c2be5f0093debb1b04d62920ceb2714cd3c3c9 /source/blender/compositor/intern/COM_NodeOperation.cc | |
parent | 9d80b3a69c490ed9d68173766872e341e6cf4245 (diff) |
Cleanup: Replace std::vector With blender::Vector.
Diffstat (limited to 'source/blender/compositor/intern/COM_NodeOperation.cc')
-rw-r--r-- | source/blender/compositor/intern/COM_NodeOperation.cc | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/source/blender/compositor/intern/COM_NodeOperation.cc b/source/blender/compositor/intern/COM_NodeOperation.cc index d14471bd301..195073545ec 100644 --- a/source/blender/compositor/intern/COM_NodeOperation.cc +++ b/source/blender/compositor/intern/COM_NodeOperation.cc @@ -41,13 +41,11 @@ NodeOperation::NodeOperation() NodeOperation::~NodeOperation() { - while (!this->m_outputs.empty()) { - delete (this->m_outputs.back()); - this->m_outputs.pop_back(); + while (!this->m_outputs.is_empty()) { + delete (this->m_outputs.pop_last()); } - while (!this->m_inputs.empty()) { - delete (this->m_inputs.back()); - this->m_inputs.pop_back(); + while (!this->m_inputs.is_empty()) { + delete (this->m_inputs.pop_last()); } } @@ -66,13 +64,13 @@ NodeOperationInput *NodeOperation::getInputSocket(unsigned int index) const void NodeOperation::addInputSocket(DataType datatype, ResizeMode resize_mode) { NodeOperationInput *socket = new NodeOperationInput(this, datatype, resize_mode); - m_inputs.push_back(socket); + m_inputs.append(socket); } void NodeOperation::addOutputSocket(DataType datatype) { NodeOperationOutput *socket = new NodeOperationOutput(this, datatype); - m_outputs.push_back(socket); + m_outputs.append(socket); } void NodeOperation::determineResolution(unsigned int resolution[2], @@ -149,15 +147,6 @@ NodeOperation *NodeOperation::getInputOperation(unsigned int inputSocketIndex) return nullptr; } -void NodeOperation::getConnectedInputSockets(Inputs *sockets) -{ - for (NodeOperationInput *input : m_inputs) { - if (input->isConnected()) { - sockets->push_back(input); - } - } -} - bool NodeOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output) |