[Bf-blender-cvs] [a874cfb8586] master: Cleanup: Move std::deque to depsgraph_type.h
Sybren A. Stüvel
noreply at git.blender.org
Thu Mar 5 17:35:58 CET 2020
Commit: a874cfb8586042e746b201654af5e8f052a4c722
Author: Sybren A. Stüvel
Date: Thu Mar 5 17:31:40 2020 +0100
Branches: master
https://developer.blender.org/rBa874cfb8586042e746b201654af5e8f052a4c722
Cleanup: Move std::deque to depsgraph_type.h
Since `std::deque` is used in a few areas of the Depsgraph, and an
upcoming patch adds one more, it's time it's considered as "commonly
used type".
No functional changes.
===================================================================
M source/blender/depsgraph/intern/builder/deg_builder_relations.cc
M source/blender/depsgraph/intern/depsgraph_query_foreach.cc
M source/blender/depsgraph/intern/depsgraph_type.h
M source/blender/depsgraph/intern/eval/deg_eval_flush.cc
===================================================================
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index de8c4a291b5..7c8403271f0 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -28,7 +28,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <cstring> /* required for STREQ later on. */
-#include <deque>
#include <unordered_set>
#include "MEM_guardedalloc.h"
@@ -121,7 +120,6 @@ extern "C" {
namespace DEG {
-using std::deque;
using std::unordered_set;
/* ***************** */
diff --git a/source/blender/depsgraph/intern/depsgraph_query_foreach.cc b/source/blender/depsgraph/intern/depsgraph_query_foreach.cc
index 0a28e379ef5..793862bf2fd 100644
--- a/source/blender/depsgraph/intern/depsgraph_query_foreach.cc
+++ b/source/blender/depsgraph/intern/depsgraph_query_foreach.cc
@@ -23,9 +23,6 @@
* Implementation of Querying and Filtering API's
*/
-// TODO(sergey): Use some sort of wrapper.
-#include <deque>
-
#include "MEM_guardedalloc.h"
extern "C" {
@@ -51,7 +48,7 @@ extern "C" {
namespace DEG {
namespace {
-typedef std::deque<OperationNode *> TraversalQueue;
+typedef deque<OperationNode *> TraversalQueue;
enum {
DEG_NODE_VISITED = (1 << 0),
};
diff --git a/source/blender/depsgraph/intern/depsgraph_type.h b/source/blender/depsgraph/intern/depsgraph_type.h
index cce64116907..201d8b9a59e 100644
--- a/source/blender/depsgraph/intern/depsgraph_type.h
+++ b/source/blender/depsgraph/intern/depsgraph_type.h
@@ -34,6 +34,7 @@
/* TODO(sergey): Ideally we'll just use char* and statically allocated strings
* to avoid any possible overhead caused by string (re)allocation/formatting. */
#include <string>
+#include <deque>
#include <vector>
#include <algorithm>
#include <map>
@@ -47,6 +48,7 @@ struct CustomData_MeshMasks;
namespace DEG {
/* Commonly used types. */
+using std::deque;
using std::map;
using std::pair;
using std::set;
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
index d99f6cccc69..2b4fd50ccc4 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
@@ -25,8 +25,6 @@
#include "intern/eval/deg_eval_flush.h"
-// TODO(sergey): Use some sort of wrapper.
-#include <deque>
#include <cmath>
#include "BLI_utildefines.h"
@@ -50,6 +48,7 @@ extern "C" {
#include "intern/debug/deg_debug.h"
#include "intern/depsgraph.h"
#include "intern/depsgraph_relation.h"
+#include "intern/depsgraph_type.h"
#include "intern/depsgraph_update.h"
#include "intern/node/deg_node.h"
#include "intern/node/deg_node_component.h"
@@ -84,7 +83,7 @@ enum {
COMPONENT_STATE_DONE = 2,
};
-typedef std::deque<OperationNode *> FlushQueue;
+typedef deque<OperationNode *> FlushQueue;
namespace {
More information about the Bf-blender-cvs
mailing list