From e5ffefe606092c848e25894ccead21f0de42510f Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Fri, 19 Mar 2021 14:26:24 +0100 Subject: Cleanup: Use enum class for DataType. --- source/blender/compositor/intern/COM_MemoryBuffer.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/blender/compositor/intern/COM_MemoryBuffer.cc') diff --git a/source/blender/compositor/intern/COM_MemoryBuffer.cc b/source/blender/compositor/intern/COM_MemoryBuffer.cc index 17a73efeab2..60f74e2ae2f 100644 --- a/source/blender/compositor/intern/COM_MemoryBuffer.cc +++ b/source/blender/compositor/intern/COM_MemoryBuffer.cc @@ -23,11 +23,11 @@ static unsigned int determine_num_channels(DataType datatype) { switch (datatype) { - case COM_DT_VALUE: + case DataType::Value: return COM_NUM_CHANNELS_VALUE; - case COM_DT_VECTOR: + case DataType::Vector: return COM_NUM_CHANNELS_VECTOR; - case COM_DT_COLOR: + case DataType::Color: default: return COM_NUM_CHANNELS_COLOR; } @@ -204,7 +204,7 @@ static void read_ewa_pixel_sampled(void *userdata, int x, int y, float result[4] void MemoryBuffer::readEWA(float *result, const float uv[2], const float derivatives[2][2]) { - BLI_assert(this->m_datatype == COM_DT_COLOR); + BLI_assert(this->m_datatype == DataType::Color); float inv_width = 1.0f / (float)this->getWidth(), inv_height = 1.0f / (float)this->getHeight(); /* TODO(sergey): Render pipeline uses normalized coordinates and derivatives, * but compositor uses pixel space. For now let's just divide the values and -- cgit v1.2.3