From 21a2b975b8192c2714625c8f5e98a08fde796ba7 Mon Sep 17 00:00:00 2001 From: Omar Emara Date: Mon, 8 Feb 2021 17:28:15 +0200 Subject: 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 --- source/blender/freestyle/intern/python/Director.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/freestyle/intern/python/Director.cpp') diff --git a/source/blender/freestyle/intern/python/Director.cpp b/source/blender/freestyle/intern/python/Director.cpp index ff1d63f5f58..4dd3f732be9 100644 --- a/source/blender/freestyle/intern/python/Director.cpp +++ b/source/blender/freestyle/intern/python/Director.cpp @@ -56,6 +56,8 @@ #include "UnaryFunction1D/BPy_UnaryFunction1DVec3f.h" #include "UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.h" +using namespace Freestyle; + // BinaryPredicate0D: __call__ int Director_BPy_BinaryPredicate0D___call__(BinaryPredicate0D *bp0D, Interface0D &i1, -- cgit v1.2.3