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:
authorSergey Sharybin <sergey@blender.org>2022-08-02 11:54:44 +0300
committerSergey Sharybin <sergey@blender.org>2022-08-02 12:38:16 +0300
commit1c90ab7bf252ba008e0f61f37886ab58c75f5c7b (patch)
tree86402776faf73c0edae7c7decda3bd882476c116 /source/blender/makesdna
parent670ced97589d3fc29feafb32e96d08541aa7b32e (diff)
Depsgraph: Make naming and recalc flag sign consistent
Always use unsigned int for the recalc flags. This allows to use all 32 bit of integer for the flags without worrying about the sign. Use full notation of `unsigned int` instead of short `uint` to avoid pulling more headers in. Whenever depsgraph API allows passing combined recalc flags call the variable `flags` and use `unsigned int` type for it. For a single flag use `IDRecalcFlag` flag. No functional changes expected.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_ID.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index a77b7034241..8b99345e237 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -37,7 +37,7 @@ typedef struct DrawData {
/* Only nested data, NOT the engine data itself. */
DrawDataFreeCb free;
/* Accumulated recalc flags, which corresponds to ID->recalc flags. */
- int recalc;
+ unsigned int recalc;
} DrawData;
typedef struct DrawDataList {
@@ -387,7 +387,7 @@ typedef struct ID {
int tag;
int us;
int icon_id;
- int recalc;
+ unsigned int recalc;
/**
* Used by undo code. recalc_after_undo_push contains the changes between the
* last undo push and the current state. This is accumulated as IDs are tagged
@@ -397,8 +397,8 @@ typedef struct ID {
* recalc_after_undo_push at the time of the undo push. This means it can be
* used to find the changes between undo states.
*/
- int recalc_up_to_undo_push;
- int recalc_after_undo_push;
+ unsigned int recalc_up_to_undo_push;
+ unsigned int recalc_after_undo_push;
/**
* A session-wide unique identifier for a given ID, that remain the same across potential
@@ -763,7 +763,7 @@ enum {
};
/* Tag given ID for an update in all the dependency graphs. */
-typedef enum IDRecalcFlag {
+typedef enum IDRecalcFlag : unsigned int {
/***************************************************************************
* Individual update tags, this is what ID gets tagged for update with. */
@@ -888,7 +888,8 @@ typedef enum IDRecalcFlag {
* Do NOT use those for tagging. */
/* Identifies that SOMETHING has been changed in this ID. */
- ID_RECALC_ALL = ~(0),
+ ID_RECALC_ALL = (0xffffffff),
+
/* Identifies that something in particle system did change. */
ID_RECALC_PSYS_ALL = (ID_RECALC_PSYS_REDO | ID_RECALC_PSYS_RESET | ID_RECALC_PSYS_CHILD |
ID_RECALC_PSYS_PHYS),