Commit 7f12513c authored by Povilas Kanapickas's avatar Povilas Kanapickas Committed by Dick Hollenbeck
Browse files

Remove some uses of using namespace std.

parent 5c28285c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -93,7 +93,7 @@ macro(perform_feature_checks)

    # CMakes check_cxx_symbol_exists() doesn't work for templates so we must create a
    # small program to verify isinf() exists in cmath.
    check_cxx_source_compiles( "#include <cmath>\nusing namespace std;\nint main(int argc, char** argv)\n{\n  (void)argv;\n  isinf(1.0);  (void)argc;\n  return 0;\n}\n"  HAVE_CMATH_ISINF )
    check_cxx_source_compiles( "#include <cmath>\nint main(int argc, char** argv)\n{\n  (void)argv;\n  std::isinf(1.0);  (void)argc;\n  return 0;\n}\n"  HAVE_CMATH_ISINF )

    #check_symbol_exists(clock_gettime "time.h" HAVE_CLOCK_GETTIME) non-standard library, does not work
    check_library_exists(rt clock_gettime "" HAVE_CLOCK_GETTIME)
+4 −5
Original line number Diff line number Diff line
@@ -25,7 +25,6 @@
#include <geometry/shape_line_chain.h>
#include <geometry/shape_circle.h>

using namespace std;
using boost::optional;

bool SHAPE_LINE_CHAIN::Collide( const VECTOR2I& aP, int aClearance ) const
@@ -137,7 +136,7 @@ int SHAPE_LINE_CHAIN::Distance( const VECTOR2I& aP ) const
    int d = INT_MAX;

    for( int s = 0; s < SegmentCount(); s++ )
        d = min( d, CSegment( s ).Distance( aP ) );
        d = std::min( d, CSegment( s ).Distance( aP ) );

    return d;
}
@@ -437,7 +436,7 @@ const optional<SHAPE_LINE_CHAIN::INTERSECTION> SHAPE_LINE_CHAIN::SelfIntersectin

SHAPE_LINE_CHAIN& SHAPE_LINE_CHAIN::Simplify()
{
    vector<VECTOR2I> pts_unique;
    std::vector<VECTOR2I> pts_unique;

    if( PointCount() < 2 )
    {
@@ -524,9 +523,9 @@ const VECTOR2I SHAPE_LINE_CHAIN::NearestPoint( const VECTOR2I& aP ) const
}


const string SHAPE_LINE_CHAIN::Format() const
const std::string SHAPE_LINE_CHAIN::Format() const
{
    stringstream ss;
    std::stringstream ss;

    ss << m_points.size() << " " << ( m_closed ? 1 : 0 ) << " ";

+2 −2
Original line number Diff line number Diff line
@@ -1358,7 +1358,7 @@ void ClipAndDrawPoly( EDA_RECT* aClipBox, wxDC* aDC, wxPoint aPoints[], int n )
    }

    // A clip box exists: clip and draw the polygon.
    static vector<wxPoint> clippedPolygon;
    static std::vector<wxPoint> clippedPolygon;
    static pointVector inputPolygon, outputPolygon;

    inputPolygon.clear();
+1 −3
Original line number Diff line number Diff line
@@ -31,8 +31,6 @@

#include <boost/foreach.hpp>

using namespace std;

struct FlagString
{
    int flag;
@@ -153,7 +151,7 @@ const std::string TOOL_EVENT::Format() const

const std::string TOOL_EVENT_LIST::Format() const
{
    string s;
    std::string s;

    BOOST_FOREACH( TOOL_EVENT e, m_events )
        s += e.Format() + " ";
+0 −1
Original line number Diff line number Diff line
@@ -47,7 +47,6 @@
#include <class_drawpanel_gal.h>

using boost::optional;
using namespace std;

/// Struct describing the current execution state of a TOOL
struct TOOL_MANAGER::TOOL_STATE
Loading