[Bf-blender-cvs] [1ade554] depsgraph_cleanup: Depsgraph: Use pragma once guider for the internal header files

Sergey Sharybin noreply at git.blender.org
Thu May 26 10:02:25 CEST 2016


Commit: 1ade5545b7e3c931e524b1e8be30ee1c9d7b73cc
Author: Sergey Sharybin
Date:   Wed May 25 14:47:37 2016 +0200
Branches: depsgraph_cleanup
https://developer.blender.org/rB1ade5545b7e3c931e524b1e8be30ee1c9d7b73cc

Depsgraph: Use pragma once guider for the internal header files

Our compilers supports it now, using it will be easier when adding new files.

===================================================================

M	source/blender/depsgraph/intern/depsgraph.h
M	source/blender/depsgraph/intern/depsgraph_build.h
M	source/blender/depsgraph/intern/depsgraph_debug.h
M	source/blender/depsgraph/intern/depsgraph_intern.h
M	source/blender/depsgraph/intern/depsgraph_queue.h
M	source/blender/depsgraph/intern/depsgraph_types.h
M	source/blender/depsgraph/intern/depsnode.h
M	source/blender/depsgraph/intern/depsnode_component.h
M	source/blender/depsgraph/intern/depsnode_operation.h

===================================================================

diff --git a/source/blender/depsgraph/intern/depsgraph.h b/source/blender/depsgraph/intern/depsgraph.h
index 424142c..4f2deb5 100644
--- a/source/blender/depsgraph/intern/depsgraph.h
+++ b/source/blender/depsgraph/intern/depsgraph.h
@@ -34,8 +34,7 @@
  * in the graph.
  */
 
-#ifndef __DEPSGRAPH_H__
-#define __DEPSGRAPH_H__
+#pragma once
 
 #include "BLI_threads.h"  /* for SpinLock */
 
@@ -197,5 +196,3 @@ struct Depsgraph {
 
 	// XXX: additional stuff like eval contexts, mempools for allocating nodes from, etc.
 };
-
-#endif  /* __DEPSGRAPH_H__ */
diff --git a/source/blender/depsgraph/intern/depsgraph_build.h b/source/blender/depsgraph/intern/depsgraph_build.h
index 14b1b0f..c80a2ad 100644
--- a/source/blender/depsgraph/intern/depsgraph_build.h
+++ b/source/blender/depsgraph/intern/depsgraph_build.h
@@ -28,8 +28,7 @@
  *  \ingroup depsgraph
  */
 
-#ifndef __DEPSGRAPH_BUILD_H__
-#define __DEPSGRAPH_BUILD_H__
+#pragma once
 
 struct Base;
 struct bGPdata;
@@ -413,5 +412,3 @@ DepsNodeHandle DepsgraphRelationBuilder::create_node_handle(const KeyType &key,
 {
 	return DepsNodeHandle(this, find_node(key), default_name);
 }
-
-#endif  /* __DEPSGRAPH_BUILD_H__ */
diff --git a/source/blender/depsgraph/intern/depsgraph_debug.h b/source/blender/depsgraph/intern/depsgraph_debug.h
index 64b9785..f0a5bf4 100644
--- a/source/blender/depsgraph/intern/depsgraph_debug.h
+++ b/source/blender/depsgraph/intern/depsgraph_debug.h
@@ -28,8 +28,7 @@
  *  \ingroup depsgraph
  */
 
-#ifndef __DEPSGRAPH_DEBUG_H__
-#define __DEPSGRAPH_DEBUG_H__
+#pragma once
 
 #include "depsgraph_types.h"
 
@@ -78,10 +77,8 @@ struct DepsgraphDebug {
 };
 
 #define DEG_DEBUG_PRINTF(...) \
-	{ \
+	do { \
 		if (G.debug & G_DEBUG_DEPSGRAPH) { \
 			fprintf(stderr, __VA_ARGS__); \
 		} \
-	} \
-
-#endif  /* __DEPSGRAPH_DEBUG_H__ */
+	} while (0)
diff --git a/source/blender/depsgraph/intern/depsgraph_intern.h b/source/blender/depsgraph/intern/depsgraph_intern.h
index 7fdc245..0ac8bb3 100644
--- a/source/blender/depsgraph/intern/depsgraph_intern.h
+++ b/source/blender/depsgraph/intern/depsgraph_intern.h
@@ -31,8 +31,7 @@
  * - Also, defines for "Node Type Info"
  */
 
-#ifndef __DEPSGRAPH_INTERN_H__
-#define __DEPSGRAPH_INTERN_H__
+#pragma once
 
 #include <cstdlib>
 
@@ -164,5 +163,3 @@ DepsNodeFactory *DEG_node_get_factory(const DepsNode *node);
 void deg_editors_id_update(struct Main *bmain, struct ID *id);
 
 void deg_editors_scene_update(struct Main *bmain, struct Scene *scene, bool updated);
-
-#endif  /* __DEPSGRAPH_INTERN_H__ */
diff --git a/source/blender/depsgraph/intern/depsgraph_queue.h b/source/blender/depsgraph/intern/depsgraph_queue.h
index b85d46b..fb5f7bb 100644
--- a/source/blender/depsgraph/intern/depsgraph_queue.h
+++ b/source/blender/depsgraph/intern/depsgraph_queue.h
@@ -30,8 +30,7 @@
  * Defines for special queue type for use in Depsgraph traversals.
  */
 
-#ifndef __DEPSGRAPH_QUEUE_H__
-#define __DEPSGRAPH_QUEUE_H__
+#pragma once
 
 struct DepsNode;
 
@@ -87,5 +86,3 @@ bool DEG_queue_is_empty(DepsgraphQueue *q);
 /* Operations */
 void DEG_queue_push(DepsgraphQueue *q, void *dnode, float cost = 0.0f);
 void *DEG_queue_pop(DepsgraphQueue *q);
-
-#endif  /* DEPSGRAPH_QUEUE_H */
diff --git a/source/blender/depsgraph/intern/depsgraph_types.h b/source/blender/depsgraph/intern/depsgraph_types.h
index f5fbf0b..1ad0353 100644
--- a/source/blender/depsgraph/intern/depsgraph_types.h
+++ b/source/blender/depsgraph/intern/depsgraph_types.h
@@ -34,8 +34,7 @@
  * in the graph.
  */
 
-#ifndef __DEPSGRAPH_TYPES_H__
-#define __DEPSGRAPH_TYPES_H__
+#pragma once
 
 #include "depsgraph_util_function.h"
 
@@ -169,5 +168,3 @@ typedef enum eDepsRelation_Type {
 	/* relationship is used to trigger editor/screen updates */
 	DEPSREL_TYPE_UPDATE_UI,
 } eDepsRelation_Type;
-
-#endif  /* __DEPSGRAPH_TYPES_H__ */
diff --git a/source/blender/depsgraph/intern/depsnode.h b/source/blender/depsgraph/intern/depsnode.h
index 4a46495..5a149f9 100644
--- a/source/blender/depsgraph/intern/depsnode.h
+++ b/source/blender/depsgraph/intern/depsnode.h
@@ -28,8 +28,7 @@
  *  \ingroup depsgraph
  */
 
-#ifndef __DEPSNODE_H__
-#define __DEPSNODE_H__
+#pragma once
 
 #include "depsgraph_types.h"
 
@@ -244,5 +243,3 @@ typedef enum eSubgraphRef_Flag {
 } eSubgraphRef_Flag;
 
 void DEG_register_base_depsnodes();
-
-#endif  /* __DEPSNODE_H__ */
diff --git a/source/blender/depsgraph/intern/depsnode_component.h b/source/blender/depsgraph/intern/depsnode_component.h
index 7f44c0e..d9ce2a6 100644
--- a/source/blender/depsgraph/intern/depsnode_component.h
+++ b/source/blender/depsgraph/intern/depsnode_component.h
@@ -28,8 +28,7 @@
  *  \ingroup depsgraph
  */
 
-#ifndef __DEPSNODE_COMPONENT_H__
-#define __DEPSNODE_COMPONENT_H__
+#pragma once
 
 #include "depsnode.h"
 
@@ -205,5 +204,3 @@ struct ShadingComponentDepsNode : public ComponentDepsNode {
 
 
 void DEG_register_component_depsnodes();
-
-#endif  /* __DEPSNODE_COMPONENT_H__ */
diff --git a/source/blender/depsgraph/intern/depsnode_operation.h b/source/blender/depsgraph/intern/depsnode_operation.h
index 8d81931..06cd0db 100644
--- a/source/blender/depsgraph/intern/depsnode_operation.h
+++ b/source/blender/depsgraph/intern/depsnode_operation.h
@@ -28,8 +28,7 @@
  *  \ingroup depsgraph
  */
 
-#ifndef __DEPSNODE_OPERATION_H__
-#define __DEPSNODE_OPERATION_H__
+#pragma once
 
 #include "depsnode.h"
 
@@ -89,5 +88,3 @@ struct OperationDepsNode : public DepsNode {
 };
 
 void DEG_register_operation_depsnodes();
-
-#endif  /* __DEPSNODE_OPERATION_H__ */




More information about the Bf-blender-cvs mailing list