Cleanup: Replace std::vector With blender::Vector.
This commit is contained in:
@@ -41,13 +41,11 @@ NodeOperation::NodeOperation()
|
|||||||
|
|
||||||
NodeOperation::~NodeOperation()
|
NodeOperation::~NodeOperation()
|
||||||
{
|
{
|
||||||
while (!this->m_outputs.empty()) {
|
while (!this->m_outputs.is_empty()) {
|
||||||
delete (this->m_outputs.back());
|
delete (this->m_outputs.pop_last());
|
||||||
this->m_outputs.pop_back();
|
|
||||||
}
|
}
|
||||||
while (!this->m_inputs.empty()) {
|
while (!this->m_inputs.is_empty()) {
|
||||||
delete (this->m_inputs.back());
|
delete (this->m_inputs.pop_last());
|
||||||
this->m_inputs.pop_back();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,13 +64,13 @@ NodeOperationInput *NodeOperation::getInputSocket(unsigned int index) const
|
|||||||
void NodeOperation::addInputSocket(DataType datatype, ResizeMode resize_mode)
|
void NodeOperation::addInputSocket(DataType datatype, ResizeMode resize_mode)
|
||||||
{
|
{
|
||||||
NodeOperationInput *socket = new NodeOperationInput(this, datatype, resize_mode);
|
NodeOperationInput *socket = new NodeOperationInput(this, datatype, resize_mode);
|
||||||
m_inputs.push_back(socket);
|
m_inputs.append(socket);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NodeOperation::addOutputSocket(DataType datatype)
|
void NodeOperation::addOutputSocket(DataType datatype)
|
||||||
{
|
{
|
||||||
NodeOperationOutput *socket = new NodeOperationOutput(this, datatype);
|
NodeOperationOutput *socket = new NodeOperationOutput(this, datatype);
|
||||||
m_outputs.push_back(socket);
|
m_outputs.append(socket);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NodeOperation::determineResolution(unsigned int resolution[2],
|
void NodeOperation::determineResolution(unsigned int resolution[2],
|
||||||
@@ -149,15 +147,6 @@ NodeOperation *NodeOperation::getInputOperation(unsigned int inputSocketIndex)
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void NodeOperation::getConnectedInputSockets(Inputs *sockets)
|
|
||||||
{
|
|
||||||
for (NodeOperationInput *input : m_inputs) {
|
|
||||||
if (input->isConnected()) {
|
|
||||||
sockets->push_back(input);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool NodeOperation::determineDependingAreaOfInterest(rcti *input,
|
bool NodeOperation::determineDependingAreaOfInterest(rcti *input,
|
||||||
ReadBufferOperation *readOperation,
|
ReadBufferOperation *readOperation,
|
||||||
rcti *output)
|
rcti *output)
|
||||||
|
@@ -80,13 +80,9 @@ enum class PixelSampler {
|
|||||||
* \ingroup Model
|
* \ingroup Model
|
||||||
*/
|
*/
|
||||||
class NodeOperation {
|
class NodeOperation {
|
||||||
public:
|
|
||||||
typedef std::vector<NodeOperationInput *> Inputs;
|
|
||||||
typedef std::vector<NodeOperationOutput *> Outputs;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Inputs m_inputs;
|
blender::Vector<NodeOperationInput *> m_inputs;
|
||||||
Outputs m_outputs;
|
blender::Vector<NodeOperationOutput *> m_outputs;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief the index of the input socket that will be used to determine the resolution
|
* \brief the index of the input socket that will be used to determine the resolution
|
||||||
@@ -162,7 +158,7 @@ class NodeOperation {
|
|||||||
*/
|
*/
|
||||||
bool isInputOperation() const
|
bool isInputOperation() const
|
||||||
{
|
{
|
||||||
return m_inputs.empty();
|
return m_inputs.is_empty();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -279,8 +275,6 @@ class NodeOperation {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void getConnectedInputSockets(Inputs *sockets);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief is this operation complex
|
* \brief is this operation complex
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user