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:
authorSybren A. Stüvel <sybren@blender.org>2020-03-05 19:31:40 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-03-05 19:32:01 +0300
commita874cfb8586042e746b201654af5e8f052a4c722 (patch)
tree2c54265876aab5ae1f9c88fc1f226ed66b948dd9 /source/blender/depsgraph
parentc43725e1891bd8534ac4b668277cddae9762d524 (diff)
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.
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations.cc2
-rw-r--r--source/blender/depsgraph/intern/depsgraph_query_foreach.cc5
-rw-r--r--source/blender/depsgraph/intern/depsgraph_type.h2
-rw-r--r--source/blender/depsgraph/intern/eval/deg_eval_flush.cc5
4 files changed, 5 insertions, 9 deletions
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 {