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:
authorHoward Trickey <howard.trickey@gmail.com>2020-12-06 18:58:14 +0300
committerHoward Trickey <howard.trickey@gmail.com>2020-12-06 18:58:14 +0300
commita90504303e78030d5be2c039848d7134a829942f (patch)
tree77dd0ba92a6a64cd33ad0a644957a0f8f3d0b315
parent538f41e949de1180b293eade11d2899354c0f6e9 (diff)
Reorder fields in boolean's ITT_value to save memory.
-rw-r--r--source/blender/blenlib/intern/mesh_intersect.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/blenlib/intern/mesh_intersect.cc b/source/blender/blenlib/intern/mesh_intersect.cc
index ab956c5c735..85a6ab42013 100644
--- a/source/blender/blenlib/intern/mesh_intersect.cc
+++ b/source/blender/blenlib/intern/mesh_intersect.cc
@@ -1055,36 +1055,36 @@ static std::ostream &operator<<(std::ostream &os, const CoplanarClusterInfo &cli
enum ITT_value_kind { INONE, IPOINT, ISEGMENT, ICOPLANAR };
struct ITT_value {
- enum ITT_value_kind kind;
mpq3 p1; /* Only relevant for IPOINT and ISEGMENT kind. */
mpq3 p2; /* Only relevant for ISEGMENT kind. */
int t_source; /* Index of the source triangle that intersected the target one. */
+ enum ITT_value_kind kind;
- ITT_value() : kind(INONE), t_source(-1)
+ ITT_value() : t_source(-1), kind(INONE)
{
}
- ITT_value(ITT_value_kind k) : kind(k), t_source(-1)
+ ITT_value(ITT_value_kind k) : t_source(-1), kind(k)
{
}
- ITT_value(ITT_value_kind k, int tsrc) : kind(k), t_source(tsrc)
+ ITT_value(ITT_value_kind k, int tsrc) : t_source(tsrc), kind(k)
{
}
- ITT_value(ITT_value_kind k, const mpq3 &p1) : kind(k), p1(p1), t_source(-1)
+ ITT_value(ITT_value_kind k, const mpq3 &p1) : p1(p1), t_source(-1), kind(k)
{
}
ITT_value(ITT_value_kind k, const mpq3 &p1, const mpq3 &p2)
- : kind(k), p1(p1), p2(p2), t_source(-1)
+ : p1(p1), p2(p2), t_source(-1), kind(k)
{
}
ITT_value(const ITT_value &other)
- : kind(other.kind), p1(other.p1), p2(other.p2), t_source(other.t_source)
+ : p1(other.p1), p2(other.p2), t_source(other.t_source), kind(other.kind)
{
}
ITT_value(ITT_value &&other) noexcept
- : kind(other.kind),
- p1(std::move(other.p1)),
+ : p1(std::move(other.p1)),
p2(std::move(other.p2)),
- t_source(other.t_source)
+ t_source(other.t_source),
+ kind(other.kind)
{
}
~ITT_value()