Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Bakker <jeroen@blender.org>2021-03-31 10:24:14 +0300
committerJeroen Bakker <jeroen@blender.org>2021-03-31 12:00:07 +0300
commite9616c82bd10a5444478d4b86fa4a8dea2041f09 (patch)
treee42bf8ef6212cb070576de6bf7d40d25e93411d6 /source/blender/compositor/COM_defines.h
parent645fc0c7679423667eb25a77bbd8fb2626d71080 (diff)
Cleanup: use constexpr for num channels.
Don't assume all compilers are smart. MSVC doesn't inline the call away like CLANG and GCC did.
Diffstat (limited to 'source/blender/compositor/COM_defines.h')
-rw-r--r--source/blender/compositor/COM_defines.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/compositor/COM_defines.h b/source/blender/compositor/COM_defines.h
index 7e580f40d97..b8f10448030 100644
--- a/source/blender/compositor/COM_defines.h
+++ b/source/blender/compositor/COM_defines.h
@@ -49,6 +49,9 @@ constexpr int COM_data_type_num_channels(const DataType datatype)
}
}
+constexpr int COM_DATA_TYPE_VALUE_CHANNELS = COM_data_type_num_channels(DataType::Value);
+constexpr int COM_DATA_TYPE_COLOR_CHANNELS = COM_data_type_num_channels(DataType::Color);
+
/**
* \brief Possible quality settings
* \see CompositorContext.quality