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.vfx@gmail.com>2020-07-03 13:57:16 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2020-07-03 13:58:13 +0300
commit6fea8ec1836880d1ab808d4d3c6821a7404d58e8 (patch)
tree78325d03363834aa94b3d992f1efa353ca2bea9e /source/blender/depsgraph
parentaab41401f9e911f417039c06a28e948d75cbcdaf (diff)
Clang-Tidy: Enable redundant static qualifier warning
This change enables readability-static-definition-in-anonymous-namespace warning in .clang-tidy configuration.
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_cycle.cc8
-rw-r--r--source/blender/depsgraph/intern/debug/deg_debug_stats_gnuplot.cc7
-rw-r--r--source/blender/depsgraph/intern/depsgraph_query_iter.cc2
-rw-r--r--source/blender/depsgraph/intern/depsgraph_tag.cc12
-rw-r--r--source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc2
-rw-r--r--source/blender/depsgraph/intern/eval/deg_eval_flush.cc14
6 files changed, 22 insertions, 23 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_cycle.cc b/source/blender/depsgraph/intern/builder/deg_builder_cycle.cc
index f8c7737c843..6fb11c5b91e 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_cycle.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_cycle.cc
@@ -77,22 +77,22 @@ struct CyclesSolverState {
int num_cycles;
};
-BLI_INLINE void set_node_visited_state(Node *node, eCyclicCheckVisitedState state)
+inline void set_node_visited_state(Node *node, eCyclicCheckVisitedState state)
{
node->custom_flags = (node->custom_flags & ~0x3) | (int)state;
}
-BLI_INLINE eCyclicCheckVisitedState get_node_visited_state(Node *node)
+inline eCyclicCheckVisitedState get_node_visited_state(Node *node)
{
return (eCyclicCheckVisitedState)(node->custom_flags & 0x3);
}
-BLI_INLINE void set_node_num_visited_children(Node *node, int num_children)
+inline void set_node_num_visited_children(Node *node, int num_children)
{
node->custom_flags = (node->custom_flags & 0x3) | (num_children << 2);
}
-BLI_INLINE int get_node_num_visited_children(Node *node)
+inline int get_node_num_visited_children(Node *node)
{
return node->custom_flags >> 2;
}
diff --git a/source/blender/depsgraph/intern/debug/deg_debug_stats_gnuplot.cc b/source/blender/depsgraph/intern/debug/deg_debug_stats_gnuplot.cc
index 78525ba6b69..515b53297b9 100644
--- a/source/blender/depsgraph/intern/debug/deg_debug_stats_gnuplot.cc
+++ b/source/blender/depsgraph/intern/debug/deg_debug_stats_gnuplot.cc
@@ -55,9 +55,8 @@ struct StatsEntry {
};
/* TODO(sergey): De-duplicate with graphviz relation debugger. */
-static void deg_debug_fprintf(const DebugContext &ctx, const char *fmt, ...)
- ATTR_PRINTF_FORMAT(2, 3);
-static void deg_debug_fprintf(const DebugContext &ctx, const char *fmt, ...)
+void deg_debug_fprintf(const DebugContext &ctx, const char *fmt, ...) ATTR_PRINTF_FORMAT(2, 3);
+void deg_debug_fprintf(const DebugContext &ctx, const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
@@ -65,7 +64,7 @@ static void deg_debug_fprintf(const DebugContext &ctx, const char *fmt, ...)
va_end(args);
}
-BLI_INLINE double get_node_time(const DebugContext & /*ctx*/, const Node *node)
+inline double get_node_time(const DebugContext & /*ctx*/, const Node *node)
{
// TODO(sergey): Figure out a nice way to define which exact time
// we want to show.
diff --git a/source/blender/depsgraph/intern/depsgraph_query_iter.cc b/source/blender/depsgraph/intern/depsgraph_query_iter.cc
index c27a7cc3b93..814f467e3d5 100644
--- a/source/blender/depsgraph/intern/depsgraph_query_iter.cc
+++ b/source/blender/depsgraph/intern/depsgraph_query_iter.cc
@@ -98,7 +98,7 @@ void verify_id_properties_freed(DEGObjectIterData *data)
temp_dupli_object->id.properties = nullptr;
}
-static bool deg_object_hide_original(eEvaluationMode eval_mode, Object *ob, DupliObject *dob)
+bool deg_object_hide_original(eEvaluationMode eval_mode, Object *ob, DupliObject *dob)
{
/* Automatic hiding if this object is being instanced on verts/faces/frames
* by its parent. Ideally this should not be needed, but due to the wrong
diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc
index f13153545fd..848275eb899 100644
--- a/source/blender/depsgraph/intern/depsgraph_tag.cc
+++ b/source/blender/depsgraph/intern/depsgraph_tag.cc
@@ -362,12 +362,12 @@ void deg_graph_id_tag_legacy_compat(
}
}
-static void graph_id_tag_update_single_flag(Main *bmain,
- Depsgraph *graph,
- ID *id,
- IDNode *id_node,
- IDRecalcFlag tag,
- eUpdateSource update_source)
+void graph_id_tag_update_single_flag(Main *bmain,
+ Depsgraph *graph,
+ ID *id,
+ IDNode *id_node,
+ IDRecalcFlag tag,
+ eUpdateSource update_source)
{
if (tag == ID_RECALC_EDITORS) {
if (graph != nullptr && graph->is_active) {
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
index 2290c37fc2a..38350d50da6 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
@@ -496,7 +496,7 @@ void update_scene_orig_pointers(const Scene *scene_orig, Scene *scene_cow)
}
/* Check whether given ID is expanded or still a shallow copy. */
-BLI_INLINE bool check_datablock_expanded(const ID *id_cow)
+inline bool check_datablock_expanded(const ID *id_cow)
{
return (id_cow->name[0] != '\0');
}
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
index a0a9ff7eca3..a74ec485d88 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
@@ -99,7 +99,7 @@ void flush_init_id_node_func(void *__restrict data_v,
}
}
-BLI_INLINE void flush_prepare(Depsgraph *graph)
+inline void flush_prepare(Depsgraph *graph)
{
for (OperationNode *node : graph->operations) {
node->scheduled = false;
@@ -114,7 +114,7 @@ BLI_INLINE void flush_prepare(Depsgraph *graph)
}
}
-BLI_INLINE void flush_schedule_entrypoints(Depsgraph *graph, FlushQueue *queue)
+inline void flush_schedule_entrypoints(Depsgraph *graph, FlushQueue *queue)
{
for (OperationNode *op_node : graph->entry_tags) {
queue->push_back(op_node);
@@ -126,15 +126,15 @@ BLI_INLINE void flush_schedule_entrypoints(Depsgraph *graph, FlushQueue *queue)
}
}
-BLI_INLINE void flush_handle_id_node(IDNode *id_node)
+inline void flush_handle_id_node(IDNode *id_node)
{
id_node->custom_flags = ID_STATE_MODIFIED;
}
/* TODO(sergey): We can reduce number of arguments here. */
-BLI_INLINE void flush_handle_component_node(IDNode *id_node,
- ComponentNode *comp_node,
- FlushQueue *queue)
+inline void flush_handle_component_node(IDNode *id_node,
+ ComponentNode *comp_node,
+ FlushQueue *queue)
{
/* We only handle component once. */
if (comp_node->custom_flags == COMPONENT_STATE_DONE) {
@@ -169,7 +169,7 @@ BLI_INLINE void flush_handle_component_node(IDNode *id_node,
* return value, so it can start being handled right away, without building too
* much of a queue.
*/
-BLI_INLINE OperationNode *flush_schedule_children(OperationNode *op_node, FlushQueue *queue)
+inline OperationNode *flush_schedule_children(OperationNode *op_node, FlushQueue *queue)
{
if (op_node->flag & DEPSOP_FLAG_USER_MODIFIED) {
IDNode *id_node = op_node->owner->owner;