diff --git a/common/view/view.cpp b/common/view/view.cpp index 4fb2f7c75e..981c8b0d31 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -1019,33 +1019,34 @@ void VIEW::UpdateItems() m_needsUpdate.clear(); } -struct VIEW::extentsVisitor { - BOX2I extents; - bool first; - extentsVisitor() - { - first = true; - } +struct VIEW::extentsVisitor +{ + BOX2I extents; + bool first; + + extentsVisitor() + { + first = true; + } + + bool operator()( VIEW_ITEM* aItem ) + { + if( first ) + extents = aItem->ViewBBox(); + else + extents.Merge ( aItem->ViewBBox() ); + return false; + } +}; - bool operator()( VIEW_ITEM* aItem ) - { - if( first ) - extents = aItem->ViewBBox(); - else - extents.Merge ( aItem->ViewBBox() ); - return false; - } - }; const BOX2I VIEW::CalculateExtents() { - extentsVisitor v; BOX2I fullScene; fullScene.SetMaximum(); - BOOST_FOREACH( VIEW_LAYER* l, m_orderedLayers ) { l->items->Query( fullScene, v ); diff --git a/pcbnew/tools/pcb_tools.cpp b/pcbnew/tools/pcb_tools.cpp index 83fda666db..ee8af05595 100644 --- a/pcbnew/tools/pcb_tools.cpp +++ b/pcbnew/tools/pcb_tools.cpp @@ -29,7 +29,6 @@ #include #include -//#include #include "selection_tool.h" #include "edit_tool.h"