[Bf-blender-cvs] [980b128b37f] functions: cleanup

Jacques Lucke noreply at git.blender.org
Wed Dec 11 14:26:45 CET 2019


Commit: 980b128b37ff48b50f8544a0f7b5ef2a781b62de
Author: Jacques Lucke
Date:   Wed Dec 11 14:00:39 2019 +0100
Branches: functions
https://developer.blender.org/rB980b128b37ff48b50f8544a0f7b5ef2a781b62de

cleanup

===================================================================

M	source/blender/blenkernel/BKE_surface_hook.h
M	source/blender/functions/intern/multi_functions/mixed.cc

===================================================================

diff --git a/source/blender/blenkernel/BKE_surface_hook.h b/source/blender/blenkernel/BKE_surface_hook.h
index 5bff23dbb96..73f155202fa 100644
--- a/source/blender/blenkernel/BKE_surface_hook.h
+++ b/source/blender/blenkernel/BKE_surface_hook.h
@@ -75,6 +75,21 @@ class SurfaceHook {
     BLI_assert(m_type == SurfaceHookType::MeshObject);
     return m_bary_coords;
   }
+
+  static bool on_same_surface(const SurfaceHook &a, const SurfaceHook &b)
+  {
+    if (a.type() != b.type()) {
+      return false;
+    }
+    switch (a.type()) {
+      case BKE::SurfaceHookType::None:
+        return true;
+      case BKE::SurfaceHookType::MeshObject:
+        return a.object_handle() == b.object_handle();
+    }
+    BLI_assert(false);
+    return false;
+  }
 };
 
 }  // namespace BKE
diff --git a/source/blender/functions/intern/multi_functions/mixed.cc b/source/blender/functions/intern/multi_functions/mixed.cc
index 99532749e6c..b3c68789457 100644
--- a/source/blender/functions/intern/multi_functions/mixed.cc
+++ b/source/blender/functions/intern/multi_functions/mixed.cc
@@ -573,19 +573,7 @@ static void get_colors_on_surface(ArrayRef<uint> indices,
           r_colors[i] = color;
         }
       },
-      [](const SurfaceHook &a, const SurfaceHook &b) {
-        if (a.type() != b.type()) {
-          return false;
-        }
-        switch (a.type()) {
-          case BKE::SurfaceHookType::MeshObject:
-            return a.object_handle() == b.object_handle();
-          case BKE::SurfaceHookType::None:
-            return true;
-        }
-        BLI_assert(false);
-        return false;
-      });
+      SurfaceHook::on_same_surface);
 }
 
 void MF_GetImageColorOnSurface::call(MFMask mask, MFParams params, MFContext context) const



More information about the Bf-blender-cvs mailing list