diff options
author | Omar Emara <mail@OmarEmara.dev> | 2021-02-08 18:28:15 +0300 |
---|---|---|
committer | Omar Emara <mail@OmarEmara.dev> | 2021-02-08 18:29:42 +0300 |
commit | 21a2b975b8192c2714625c8f5e98a08fde796ba7 (patch) | |
tree | 6ed0259b5f525072aa48e22e0f3764d6aee17e52 /source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.h | |
parent | 048135e2c826b46ecf77324b93246ad70171e91d (diff) |
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
Diffstat (limited to 'source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.h')
-rw-r--r-- | source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.h b/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.h index b761f6f6ace..b34fad9e213 100644 --- a/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.h +++ b/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.h @@ -26,8 +26,6 @@ extern "C" { #include "../stroke/Predicates1D.h" -using namespace Freestyle; - #ifdef __cplusplus extern "C" { #endif @@ -41,7 +39,7 @@ extern PyTypeObject BinaryPredicate1D_Type; /*---------------------------Python BPy_BinaryPredicate1D structure definition----------*/ typedef struct { - PyObject_HEAD BinaryPredicate1D *bp1D; + PyObject_HEAD Freestyle::BinaryPredicate1D *bp1D; } BPy_BinaryPredicate1D; /*---------------------------Python BPy_BinaryPredicate1D visible prototypes-----------*/ |