From 5b3d1d72e8590d691f7478c494fb42188f5709b2 Mon Sep 17 00:00:00 2001 From: Simon Richter Date: Sat, 28 May 2016 12:57:19 -0400 Subject: [PATCH] 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 252ef3c715..d31c0bde94 100644 --- a/pcbnew/ratsnest_viewitem.cpp +++ b/pcbnew/ratsnest_viewitem.cpp @@ -35,7 +35,7 @@ #include -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 ); } + +}