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:
authorCampbell Barton <ideasman42@gmail.com>2021-06-29 13:13:55 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-06-29 13:23:30 +0300
commitf2c52aa0e1a5a6905849daa299ab907e60cab983 (patch)
tree66a0a61f511929ada3cfd08668a38980724e4a7e /source/blender/editors/transform/transform_snap.h
parent855f7fee63c4bc57d5e154ced0e7e51bf315ea32 (diff)
Cleanup: use 'const' arguments in transform calculation
Use const arguments to simplify further optimizations. Transforming elements shouldn't need to change their containers data-structures. ElementResize for grease pencil stroke thickness was modifying TransInfo.num & TransInfo.values_final. Now copies are operated on to preserve const correctness although it's worth investigating if this can be avoided altogether.
Diffstat (limited to 'source/blender/editors/transform/transform_snap.h')
-rw-r--r--source/blender/editors/transform/transform_snap.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/transform/transform_snap.h b/source/blender/editors/transform/transform_snap.h
index 1632b49fbbf..bf14e564380 100644
--- a/source/blender/editors/transform/transform_snap.h
+++ b/source/blender/editors/transform/transform_snap.h
@@ -54,8 +54,8 @@ void snapFrameTransform(struct TransInfo *t,
bool transformModeUseSnap(const TransInfo *t);
-bool transform_snap_increment_ex(TransInfo *t, bool use_local_space, float *r_val);
-bool transform_snap_increment(TransInfo *t, float *val);
+bool transform_snap_increment_ex(const TransInfo *t, bool use_local_space, float *r_val);
+bool transform_snap_increment(const TransInfo *t, float *val);
bool transform_snap_grid(TransInfo *t, float *val);
void snapSequenceBounds(TransInfo *t, const int mval[2]);