Cleanup: Remove using-directive from freestyle headers
The header files in freestyle utilize the using-directive at the global file scope. This is a bad practice as it pollutes the global name space causing possible ambiguous reference compilation errors. In particular, the DNA files that are included by freestyle will cause those ambiguous reference errors when the developers adds a DNA member with a type name that also exist in the Freestyle name space, such as Curve and possibly others. This patch does the minimal work needed to resolve that by moving the using-directives from the headers into the corresponding translation units. Reviewed By: Brecht Differential Revision: https://developer.blender.org/D10351
This commit is contained in:
@@ -26,8 +26,6 @@ extern "C" {
|
||||
|
||||
#include "../stroke/Predicates0D.h"
|
||||
|
||||
using namespace Freestyle;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -41,7 +39,7 @@ extern PyTypeObject BinaryPredicate0D_Type;
|
||||
|
||||
/*---------------------------Python BPy_BinaryPredicate0D structure definition----------*/
|
||||
typedef struct {
|
||||
PyObject_HEAD BinaryPredicate0D *bp0D;
|
||||
PyObject_HEAD Freestyle::BinaryPredicate0D *bp0D;
|
||||
} BPy_BinaryPredicate0D;
|
||||
|
||||
/*---------------------------Python BPy_BinaryPredicate0D visible prototypes-----------*/
|
||||
|
||||
Reference in New Issue
Block a user