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:
authorJacques Lucke <jacques@blender.org>2021-12-27 18:08:11 +0300
committerJacques Lucke <jacques@blender.org>2021-12-27 18:08:11 +0300
commit51a131ddbc2eeebd13cdc6a71b2d356267fda73e (patch)
treef85e2e4f2f809e0ebba5876428a1d07ed6ea20cc /source/blender/modifiers
parent594438ef0d6135a5bbf9101292db9f2d3aca9312 (diff)
BLI: add utility to check if type is any specific type
This adds `blender::is_same_any_v` which is the almost the same as `std::is_same_v`. The difference is that it allows for checking multiple types at the same time. Differential Revision: https://developer.blender.org/D13673
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r--source/blender/modifiers/intern/MOD_volume_displace.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/modifiers/intern/MOD_volume_displace.cc b/source/blender/modifiers/intern/MOD_volume_displace.cc
index fcf75040a9a..a1ca29f454c 100644
--- a/source/blender/modifiers/intern/MOD_volume_displace.cc
+++ b/source/blender/modifiers/intern/MOD_volume_displace.cc
@@ -203,9 +203,10 @@ struct DisplaceGridOp {
template<typename GridType> void operator()()
{
- if constexpr (std::is_same_v<GridType, openvdb::points::PointDataGrid> ||
- std::is_same_v<GridType, openvdb::StringGrid> ||
- std::is_same_v<GridType, openvdb::MaskGrid>) {
+ if constexpr (blender::is_same_any_v<GridType,
+ openvdb::points::PointDataGrid,
+ openvdb::StringGrid,
+ openvdb::MaskGrid>) {
/* We don't support displacing these grid types yet. */
return;
}