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 <mail@jlucke.com>2020-02-10 18:23:14 +0300
committerJacques Lucke <mail@jlucke.com>2020-02-10 18:23:14 +0300
commitb4bf6b9cc9705c2cb8f32e5a9986bf769e4158eb (patch)
treec83303a9a2131aeeab34755d29a6d8af967b2dab /source/blender/functions
parent2d368366166f1be74920e99b4e771df243b852df (diff)
remove pad_up function
Diffstat (limited to 'source/blender/functions')
-rw-r--r--source/blender/functions/intern/generic_tuple.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/functions/intern/generic_tuple.cc b/source/blender/functions/intern/generic_tuple.cc
index b7216362f13..b58a05be9d4 100644
--- a/source/blender/functions/intern/generic_tuple.cc
+++ b/source/blender/functions/intern/generic_tuple.cc
@@ -10,10 +10,11 @@ GenericTupleInfo::GenericTupleInfo(Vector<const CPPType *> types) : m_types(std:
for (const CPPType *type : m_types) {
uint size = type->size();
uint alignment = type->alignment();
+ uint alignment_mask = alignment - 1;
m_alignment = std::max(m_alignment, alignment);
- m_size__data = pad_up(m_size__data, alignment);
+ m_size__data = (m_size__data + alignment_mask) & ~alignment_mask;
m_offsets.append(m_size__data);
m_size__data += size;