kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #24782
[PATCH 03/12] Open namespace around definitions
While defining functions in another namespace is technically allowed as
long as the definition can be matched to a declaration, this can lead to
ambiguous resolutions, such as here (GAL vs KIGFX).
---
pcbnew/ratsnest_viewitem.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/pcbnew/ratsnest_viewitem.cpp b/pcbnew/ratsnest_viewitem.cpp
index 252ef3c..d31c0bd 100644
--- a/pcbnew/ratsnest_viewitem.cpp
+++ b/pcbnew/ratsnest_viewitem.cpp
@@ -35,7 +35,7 @@
#include <boost/foreach.hpp>
-using namespace KIGFX;
+namespace KIGFX {
RATSNEST_VIEWITEM::RATSNEST_VIEWITEM( RN_DATA* aData ) :
EDA_ITEM( NOT_USED ), m_data( aData )
@@ -118,3 +118,5 @@ void RATSNEST_VIEWITEM::ViewGetLayers( int aLayers[], int& aCount ) const
aCount = 1;
aLayers[0] = ITEM_GAL_LAYER( RATSNEST_VISIBLE );
}
+
+}
Follow ups
References