[Bf-blender-cvs] [963df44] hair_system: Fix for diverging Release/Debug code.
Lukas Tönne
noreply at git.blender.org
Mon Aug 4 17:46:52 CEST 2014
Commit: 963df448128f0b6cd4541e2f7ea6c6edf22b161f
Author: Lukas Tönne
Date: Mon Aug 4 17:46:39 2014 +0200
Branches: hair_system
https://developer.blender.org/rB963df448128f0b6cd4541e2f7ea6c6edf22b161f
Fix for diverging Release/Debug code.
Moved the ifdef inside the debugger functions now, so it's not so easy
to ignore changes in the function signatures.
===================================================================
M source/blender/hair/intern/HAIR_debug.h
===================================================================
diff --git a/source/blender/hair/intern/HAIR_debug.h b/source/blender/hair/intern/HAIR_debug.h
index d363dde..9c4f2b1 100644
--- a/source/blender/hair/intern/HAIR_debug.h
+++ b/source/blender/hair/intern/HAIR_debug.h
@@ -43,31 +43,36 @@ struct Debug {
};
typedef std::vector<Contact> CollisionContacts;
-#ifdef HAIR_DEBUG
static void collision_contact(const float3 &coA, const float3 &coB)
{
+#ifdef HAIR_DEBUG
if (m_contacts) {
Contact c;
c.coA = coA;
c.coB = coB;
m_contacts->push_back(c);
}
+#else
+ (void)coA;
+ (void)coB;
+#endif
}
static void set_collision_contacts(CollisionContacts *contacts)
{
+#ifdef HAIR_DEBUG
m_contacts = contacts;
+#else
+ (void)contacts;
+#endif
}
-
+
+#ifdef HAIR_DEBUG
+
private:
static CollisionContacts *m_contacts;
-#else
-
- static void collision_contact(const float3 &co) {}
- static void set_collision_contacts(CollisionContacts *contacts) {}
-
#endif
};
More information about the Bf-blender-cvs
mailing list