From d64803f63b4311b0abb93542a907e97b47493e9f Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Fri, 3 Jul 2020 14:15:05 +0200 Subject: Cleanup: Use trailing underscore for non-public data members This makes the code conform better with our style guide. --- source/blender/blenlib/BLI_dot_export.hh | 70 ++++++++++++++++---------------- 1 file changed, 35 insertions(+), 35 deletions(-) (limited to 'source/blender/blenlib/BLI_dot_export.hh') diff --git a/source/blender/blenlib/BLI_dot_export.hh b/source/blender/blenlib/BLI_dot_export.hh index b496c00a75d..bad7e4c57a8 100644 --- a/source/blender/blenlib/BLI_dot_export.hh +++ b/source/blender/blenlib/BLI_dot_export.hh @@ -49,25 +49,25 @@ class AttributeList; class AttributeList { private: - Map m_attributes; + Map attributes_; public: void export__as_bracket_list(std::stringstream &ss) const; void set(StringRef key, StringRef value) { - m_attributes.add_overwrite(key, value); + attributes_.add_overwrite(key, value); } }; class Graph { private: - AttributeList m_attributes; - Vector> m_nodes; - Vector> m_clusters; + AttributeList attributes_; + Vector> nodes_; + Vector> clusters_; - Set m_top_level_nodes; - Set m_top_level_clusters; + Set top_level_nodes_; + Set top_level_clusters_; friend Cluster; friend Node; @@ -80,7 +80,7 @@ class Graph { void set_attribute(StringRef key, StringRef value) { - m_attributes.set(key, value); + attributes_.set(key, value); } void set_rankdir(Attr_rankdir rankdir) @@ -93,16 +93,16 @@ class Graph { class Cluster { private: - AttributeList m_attributes; - Graph &m_graph; - Cluster *m_parent = nullptr; - Set m_children; - Set m_nodes; + AttributeList attributes_; + Graph &graph_; + Cluster *parent_ = nullptr; + Set children_; + Set nodes_; friend Graph; friend Node; - Cluster(Graph &graph) : m_graph(graph) + Cluster(Graph &graph) : graph_(graph) { } @@ -111,7 +111,7 @@ class Cluster { void set_attribute(StringRef key, StringRef value) { - m_attributes.set(key, value); + attributes_.set(key, value); } void set_parent_cluster(Cluster *cluster); @@ -125,25 +125,25 @@ class Cluster { class Node { private: - AttributeList m_attributes; - Graph &m_graph; - Cluster *m_cluster = nullptr; + AttributeList attributes_; + Graph &graph_; + Cluster *cluster_ = nullptr; friend Graph; - Node(Graph &graph) : m_graph(graph) + Node(Graph &graph) : graph_(graph) { } public: const AttributeList &attributes() const { - return m_attributes; + return attributes_; } AttributeList &attributes() { - return m_attributes; + return attributes_; } void set_parent_cluster(Cluster *cluster); @@ -154,7 +154,7 @@ class Node { void set_attribute(StringRef key, StringRef value) { - m_attributes.set(key, value); + attributes_.set(key, value); } void set_shape(Attr_shape shape) @@ -176,7 +176,7 @@ class Node { class UndirectedGraph final : public Graph { private: - Vector> m_edges; + Vector> edges_; public: std::string to_dot_string() const; @@ -186,7 +186,7 @@ class UndirectedGraph final : public Graph { class DirectedGraph final : public Graph { private: - Vector> m_edges; + Vector> edges_; public: std::string to_dot_string() const; @@ -196,12 +196,12 @@ class DirectedGraph final : public Graph { class NodePort { private: - Node *m_node; - std::optional m_port_name; + Node *node_; + std::optional port_name_; public: NodePort(Node &node, std::optional port_name = {}) - : m_node(&node), m_port_name(std::move(port_name)) + : node_(&node), port_name_(std::move(port_name)) { } @@ -210,18 +210,18 @@ class NodePort { class Edge : blender::NonCopyable, blender::NonMovable { protected: - AttributeList m_attributes; - NodePort m_a; - NodePort m_b; + AttributeList attributes_; + NodePort a_; + NodePort b_; public: - Edge(NodePort a, NodePort b) : m_a(std::move(a)), m_b(std::move(b)) + Edge(NodePort a, NodePort b) : a_(std::move(a)), b_(std::move(b)) { } void set_attribute(StringRef key, StringRef value) { - m_attributes.set(key, value); + attributes_.set(key, value); } void set_arrowhead(Attr_arrowType type) @@ -262,7 +262,7 @@ std::string color_attr_from_hsv(float h, float s, float v); class NodeWithSocketsRef { private: - Node *m_node; + Node *node_; public: NodeWithSocketsRef(Node &node, @@ -273,13 +273,13 @@ class NodeWithSocketsRef { NodePort input(uint index) const { std::string port = "\"in" + std::to_string(index) + "\""; - return NodePort(*m_node, port); + return NodePort(*node_, port); } NodePort output(uint index) const { std::string port = "\"out" + std::to_string(index) + "\""; - return NodePort(*m_node, port); + return NodePort(*node_, port); } }; -- cgit v1.2.3