Wide characterize libs and bitmap2component source.

(cherry picked from commit 54f91a0221)
This commit is contained in:
Wayne Stambaugh 2022-02-09 09:01:30 -05:00
parent 3f8f90db9f
commit e93b7b05ec
9 changed files with 54 additions and 51 deletions

View File

@ -2,7 +2,7 @@
* This program source code file is part of KICAD, a free EDA CAD application. * This program source code file is part of KICAD, a free EDA CAD application.
* *
* Copyright (C) 1992-2010 jean-pierre.charras * Copyright (C) 1992-2010 jean-pierre.charras
* Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -468,7 +468,7 @@ wxString BM2CMP_FRAME::FormatOutputSize( double aSize )
} }
else else
{ {
text.Printf( "%d", KiROUND( aSize ) ); text.Printf( wxT( "%d" ), KiROUND( aSize ) );
} }
return text; return text;

View File

@ -57,16 +57,16 @@ static inline wxString SHAPE_TYPE_asString( SHAPE_TYPE a )
{ {
switch( a ) switch( a )
{ {
case SH_RECT: return "SH_RECT"; case SH_RECT: return wxT( "SH_RECT" );
case SH_SEGMENT: return "SH_SEGMENT"; case SH_SEGMENT: return wxT( "SH_SEGMENT" );
case SH_LINE_CHAIN: return "SH_LINE_CHAIN"; case SH_LINE_CHAIN: return wxT( "SH_LINE_CHAIN" );
case SH_CIRCLE: return "SH_CIRCLE"; case SH_CIRCLE: return wxT( "SH_CIRCLE" );
case SH_SIMPLE: return "SH_SIMPLE"; case SH_SIMPLE: return wxT( "SH_SIMPLE" );
case SH_POLY_SET: return "SH_POLY_SET"; case SH_POLY_SET: return wxT( "SH_POLY_SET" );
case SH_COMPOUND: return "SH_COMPOUND"; case SH_COMPOUND: return wxT( "SH_COMPOUND" );
case SH_ARC: return "SH_ARC"; case SH_ARC: return wxT( "SH_ARC" );
case SH_NULL: return "SH_NULL"; case SH_NULL: return wxT( "SH_NULL" );
case SH_POLY_SET_TRIANGLE: return "SH_POLY_SET_TRIANGLE"; case SH_POLY_SET_TRIANGLE: return wxT( "SH_POLY_SET_TRIANGLE" );
} }
return wxEmptyString; // Just to quiet GCC. return wxEmptyString; // Just to quiet GCC.

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2021 Roberto Fernandez Bautista <roberto.fer.bau@gmail.com> * Copyright (C) 2021 Roberto Fernandez Bautista <roberto.fer.bau@gmail.com>
* Copyright (C) 2021 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 2021-2022 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software: you can redistribute it and/or modify it * This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the * under the terms of the GNU General Public License as published by the
@ -99,7 +99,7 @@ CIRCLE& CIRCLE::ConstructFromTanTanPt( const SEG& aLineA, const SEG& aLineB, con
Center = aP; // use this circle as a construction to find the actual centers Center = aP; // use this circle as a construction to find the actual centers
std::vector<VECTOR2I> possibleCenters = IntersectLine( anglebisector ); std::vector<VECTOR2I> possibleCenters = IntersectLine( anglebisector );
wxCHECK_MSG( possibleCenters.size() > 0, *this, "No solutions exist!" ); wxCHECK_MSG( possibleCenters.size() > 0, *this, wxT( "No solutions exist!" ) );
intersectPoint = aLineA.A; // just for the purpose of deciding which solution to return intersectPoint = aLineA.A; // just for the purpose of deciding which solution to return
// For the special case of the two segments being parallel, we will return the solution // For the special case of the two segments being parallel, we will return the solution
@ -112,7 +112,7 @@ CIRCLE& CIRCLE::ConstructFromTanTanPt( const SEG& aLineA, const SEG& aLineB, con
// All circles inscribed in the same angle are homothetic with center at the intersection // All circles inscribed in the same angle are homothetic with center at the intersection
// In this code, the prefix "h" denotes "the homothetic image" // In this code, the prefix "h" denotes "the homothetic image"
OPT_VECTOR2I intersectCalc = aLineA.IntersectLines( aLineB ); OPT_VECTOR2I intersectCalc = aLineA.IntersectLines( aLineB );
wxCHECK_MSG( intersectCalc, *this, "Lines do not intersect but are not parallel?" ); wxCHECK_MSG( intersectCalc, *this, wxT( "Lines do not intersect but are not parallel?" ) );
intersectPoint = intersectCalc.get(); intersectPoint = intersectCalc.get();
if( aP == intersectPoint ) if( aP == intersectPoint )
@ -139,7 +139,7 @@ CIRCLE& CIRCLE::ConstructFromTanTanPt( const SEG& aLineA, const SEG& aLineB, con
// Find the homothetic image of aP in the construction circle (hSolution) // Find the homothetic image of aP in the construction circle (hSolution)
SEG throughaP( intersectPoint, aP ); SEG throughaP( intersectPoint, aP );
std::vector<VECTOR2I> hProjections = hSolution.IntersectLine( throughaP ); std::vector<VECTOR2I> hProjections = hSolution.IntersectLine( throughaP );
wxCHECK_MSG( hProjections.size() > 0, *this, "No solutions exist!" ); wxCHECK_MSG( hProjections.size() > 0, *this, wxT( "No solutions exist!" ) );
// We want to create a fillet, so the projection of homothetic projection of aP // We want to create a fillet, so the projection of homothetic projection of aP
// should be the one closest to the intersection // should be the one closest to the intersection
@ -154,12 +154,12 @@ CIRCLE& CIRCLE::ConstructFromTanTanPt( const SEG& aLineA, const SEG& aLineB, con
// Find the tangent at line A by homothetic inversion // Find the tangent at line A by homothetic inversion
SEG hT( hTanLineA, hSelected ); SEG hT( hTanLineA, hSelected );
OPT_VECTOR2I actTanA = hT.ParallelSeg( aP ).IntersectLines( aLineA ); OPT_VECTOR2I actTanA = hT.ParallelSeg( aP ).IntersectLines( aLineA );
wxCHECK_MSG( actTanA, *this, "No solutions exist!" ); wxCHECK_MSG( actTanA, *this, wxT( "No solutions exist!" ) );
// Find circle center by perpendicular intersection with the angle bisector // Find circle center by perpendicular intersection with the angle bisector
SEG perpendicularToTanA = aLineA.PerpendicularSeg( actTanA.get() ); SEG perpendicularToTanA = aLineA.PerpendicularSeg( actTanA.get() );
OPT_VECTOR2I actCenter = perpendicularToTanA.IntersectLines( anglebisector ); OPT_VECTOR2I actCenter = perpendicularToTanA.IntersectLines( anglebisector );
wxCHECK_MSG( actCenter, *this, "No solutions exist!" ); wxCHECK_MSG( actCenter, *this, wxT( "No solutions exist!" ) );
Center = actCenter.get(); Center = actCenter.get();
Radius = aLineA.LineDistance( Center ); Radius = aLineA.LineDistance( Center );
@ -169,12 +169,12 @@ CIRCLE& CIRCLE::ConstructFromTanTanPt( const SEG& aLineA, const SEG& aLineB, con
// Find the tangent at line B by inversion // Find the tangent at line B by inversion
SEG hT( hTanLineB, hSelected ); SEG hT( hTanLineB, hSelected );
OPT_VECTOR2I actTanB = hT.ParallelSeg( aP ).IntersectLines( aLineB ); OPT_VECTOR2I actTanB = hT.ParallelSeg( aP ).IntersectLines( aLineB );
wxCHECK_MSG( actTanB, *this, "No solutions exist!" ); wxCHECK_MSG( actTanB, *this, wxT( "No solutions exist!" ) );
// Find circle center by perpendicular intersection with the angle bisector // Find circle center by perpendicular intersection with the angle bisector
SEG perpendicularToTanB = aLineB.PerpendicularSeg( actTanB.get() ); SEG perpendicularToTanB = aLineB.PerpendicularSeg( actTanB.get() );
OPT_VECTOR2I actCenter = perpendicularToTanB.IntersectLines( anglebisector ); OPT_VECTOR2I actCenter = perpendicularToTanB.IntersectLines( anglebisector );
wxCHECK_MSG( actCenter, *this, "No solutions exist!" ); wxCHECK_MSG( actCenter, *this, wxT( "No solutions exist!" ) );
Center = actCenter.get(); Center = actCenter.get();
Radius = aLineB.LineDistance( Center ); Radius = aLineB.LineDistance( Center );

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2013 CERN * Copyright (C) 2013 CERN
* Copyright (C) 2015-2020 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 2015-2022 KiCad Developers, see AUTHORS.txt for contributors.
* @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch> * @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
@ -289,7 +289,7 @@ static inline bool Collide( const SHAPE_CIRCLE& aA, const SHAPE_SEGMENT& aSeg, i
static inline bool Collide( const SHAPE_LINE_CHAIN_BASE& aA, const SHAPE_LINE_CHAIN_BASE& aB, static inline bool Collide( const SHAPE_LINE_CHAIN_BASE& aA, const SHAPE_LINE_CHAIN_BASE& aB,
int aClearance, int* aActual, VECTOR2I* aLocation, VECTOR2I* aMTV ) int aClearance, int* aActual, VECTOR2I* aLocation, VECTOR2I* aMTV )
{ {
wxASSERT_MSG( !aMTV, wxString::Format( "MTV not implemented for %s : %s collisions", wxASSERT_MSG( !aMTV, wxString::Format( wxT( "MTV not implemented for %s : %s collisions" ),
aA.Type(), aA.Type(),
aB.Type() ) ); aB.Type() ) );
@ -345,7 +345,7 @@ static inline bool Collide( const SHAPE_LINE_CHAIN_BASE& aA, const SHAPE_LINE_CH
const SHAPE_ARC& arc = aB_line_chain->Arc( i ); const SHAPE_ARC& arc = aB_line_chain->Arc( i );
// The arcs in the chain should have zero width // The arcs in the chain should have zero width
wxASSERT_MSG( arc.GetWidth() == 0, "Invalid arc width - should be zero" ); wxASSERT_MSG( arc.GetWidth() == 0, wxT( "Invalid arc width - should be zero" ) );
if( arc.Collide( &aA, aClearance, aActual, aLocation ) ) if( arc.Collide( &aA, aClearance, aActual, aLocation ) )
return true; return true;
@ -371,7 +371,7 @@ static inline bool Collide( const SHAPE_LINE_CHAIN_BASE& aA, const SHAPE_LINE_CH
static inline bool Collide( const SHAPE_RECT& aA, const SHAPE_LINE_CHAIN_BASE& aB, int aClearance, static inline bool Collide( const SHAPE_RECT& aA, const SHAPE_LINE_CHAIN_BASE& aB, int aClearance,
int* aActual, VECTOR2I* aLocation, VECTOR2I* aMTV ) int* aActual, VECTOR2I* aLocation, VECTOR2I* aMTV )
{ {
wxASSERT_MSG( !aMTV, wxString::Format( "MTV not implemented for %s : %s collisions", wxASSERT_MSG( !aMTV, wxString::Format( wxT( "MTV not implemented for %s : %s collisions" ),
aA.Type(), aA.Type(),
aB.Type() ) ); aB.Type() ) );
@ -428,7 +428,7 @@ static inline bool Collide( const SHAPE_RECT& aA, const SHAPE_LINE_CHAIN_BASE& a
static inline bool Collide( const SHAPE_RECT& aA, const SHAPE_SEGMENT& aB, int aClearance, static inline bool Collide( const SHAPE_RECT& aA, const SHAPE_SEGMENT& aB, int aClearance,
int* aActual, VECTOR2I* aLocation, VECTOR2I* aMTV ) int* aActual, VECTOR2I* aLocation, VECTOR2I* aMTV )
{ {
wxASSERT_MSG( !aMTV, wxString::Format( "MTV not implemented for %s : %s collisions", wxASSERT_MSG( !aMTV, wxString::Format( wxT( "MTV not implemented for %s : %s collisions" ),
aA.Type(), aA.Type(),
aB.Type() ) ); aB.Type() ) );
@ -444,7 +444,7 @@ static inline bool Collide( const SHAPE_RECT& aA, const SHAPE_SEGMENT& aB, int a
static inline bool Collide( const SHAPE_SEGMENT& aA, const SHAPE_SEGMENT& aB, int aClearance, static inline bool Collide( const SHAPE_SEGMENT& aA, const SHAPE_SEGMENT& aB, int aClearance,
int* aActual, VECTOR2I* aLocation, VECTOR2I* aMTV ) int* aActual, VECTOR2I* aLocation, VECTOR2I* aMTV )
{ {
wxASSERT_MSG( !aMTV, wxString::Format( "MTV not implemented for %s : %s collisions", wxASSERT_MSG( !aMTV, wxString::Format( wxT( "MTV not implemented for %s : %s collisions" ),
aA.Type(), aA.Type(),
aB.Type() ) ); aB.Type() ) );
@ -460,7 +460,7 @@ static inline bool Collide( const SHAPE_SEGMENT& aA, const SHAPE_SEGMENT& aB, in
static inline bool Collide( const SHAPE_LINE_CHAIN_BASE& aA, const SHAPE_SEGMENT& aB, static inline bool Collide( const SHAPE_LINE_CHAIN_BASE& aA, const SHAPE_SEGMENT& aB,
int aClearance, int* aActual, VECTOR2I* aLocation, VECTOR2I* aMTV ) int aClearance, int* aActual, VECTOR2I* aLocation, VECTOR2I* aMTV )
{ {
wxASSERT_MSG( !aMTV, wxString::Format( "MTV not implemented for %s : %s collisions", wxASSERT_MSG( !aMTV, wxString::Format( wxT( "MTV not implemented for %s : %s collisions" ),
aA.Type(), aA.Type(),
aB.Type() ) ); aB.Type() ) );
@ -483,7 +483,7 @@ static inline bool Collide( const SHAPE_RECT& aA, const SHAPE_RECT& aB, int aCle
static inline bool Collide( const SHAPE_ARC& aA, const SHAPE_RECT& aB, int aClearance, static inline bool Collide( const SHAPE_ARC& aA, const SHAPE_RECT& aB, int aClearance,
int* aActual, VECTOR2I* aLocation, VECTOR2I* aMTV ) int* aActual, VECTOR2I* aLocation, VECTOR2I* aMTV )
{ {
wxASSERT_MSG( !aMTV, wxString::Format( "MTV not implemented for %s : %s collisions", wxASSERT_MSG( !aMTV, wxString::Format( wxT( "MTV not implemented for %s : %s collisions" ),
aA.Type(), aA.Type(),
aB.Type() ) ); aB.Type() ) );
@ -501,7 +501,7 @@ static inline bool Collide( const SHAPE_ARC& aA, const SHAPE_RECT& aB, int aClea
static inline bool Collide( const SHAPE_ARC& aA, const SHAPE_CIRCLE& aB, int aClearance, static inline bool Collide( const SHAPE_ARC& aA, const SHAPE_CIRCLE& aB, int aClearance,
int* aActual, VECTOR2I* aLocation, VECTOR2I* aMTV ) int* aActual, VECTOR2I* aLocation, VECTOR2I* aMTV )
{ {
wxASSERT_MSG( !aMTV, wxString::Format( "MTV not implemented for %s : %s collisions", wxASSERT_MSG( !aMTV, wxString::Format( wxT( "MTV not implemented for %s : %s collisions" ),
aA.Type(), aA.Type(),
aB.Type() ) ); aB.Type() ) );
@ -519,7 +519,7 @@ static inline bool Collide( const SHAPE_ARC& aA, const SHAPE_CIRCLE& aB, int aCl
static inline bool Collide( const SHAPE_ARC& aA, const SHAPE_LINE_CHAIN& aB, int aClearance, static inline bool Collide( const SHAPE_ARC& aA, const SHAPE_LINE_CHAIN& aB, int aClearance,
int* aActual, VECTOR2I* aLocation, VECTOR2I* aMTV ) int* aActual, VECTOR2I* aLocation, VECTOR2I* aMTV )
{ {
wxASSERT_MSG( !aMTV, wxString::Format( "MTV not implemented for %s : %s collisions", wxASSERT_MSG( !aMTV, wxString::Format( wxT( "MTV not implemented for %s : %s collisions" ),
aA.Type(), aA.Type(),
aB.Type() ) ); aB.Type() ) );
@ -566,7 +566,7 @@ static inline bool Collide( const SHAPE_ARC& aA, const SHAPE_LINE_CHAIN& aB, int
const SHAPE_ARC& arc = aB.Arc( i ); const SHAPE_ARC& arc = aB.Arc( i );
// The arcs in the chain should have zero width // The arcs in the chain should have zero width
wxASSERT_MSG( arc.GetWidth() == 0, "Invalid arc width - should be zero" ); wxASSERT_MSG( arc.GetWidth() == 0, wxT( "Invalid arc width - should be zero" ) );
if( arc.Collide( &aA, aClearance, aActual, aLocation ) ) if( arc.Collide( &aA, aClearance, aActual, aLocation ) )
return true; return true;
@ -591,7 +591,7 @@ static inline bool Collide( const SHAPE_ARC& aA, const SHAPE_LINE_CHAIN& aB, int
static inline bool Collide( const SHAPE_ARC& aA, const SHAPE_SEGMENT& aB, int aClearance, static inline bool Collide( const SHAPE_ARC& aA, const SHAPE_SEGMENT& aB, int aClearance,
int* aActual, VECTOR2I* aLocation, VECTOR2I* aMTV ) int* aActual, VECTOR2I* aLocation, VECTOR2I* aMTV )
{ {
wxASSERT_MSG( !aMTV, wxString::Format( "MTV not implemented for %s : %s collisions", wxASSERT_MSG( !aMTV, wxString::Format( wxT( "MTV not implemented for %s : %s collisions" ),
aA.Type(), aA.Type(),
aB.Type() ) ); aB.Type() ) );
@ -609,7 +609,7 @@ static inline bool Collide( const SHAPE_ARC& aA, const SHAPE_SEGMENT& aB, int aC
static inline bool Collide( const SHAPE_ARC& aA, const SHAPE_LINE_CHAIN_BASE& aB, int aClearance, static inline bool Collide( const SHAPE_ARC& aA, const SHAPE_LINE_CHAIN_BASE& aB, int aClearance,
int* aActual, VECTOR2I* aLocation, VECTOR2I* aMTV ) int* aActual, VECTOR2I* aLocation, VECTOR2I* aMTV )
{ {
wxASSERT_MSG( !aMTV, wxString::Format( "MTV not implemented for %s : %s collisions", wxASSERT_MSG( !aMTV, wxString::Format( wxT( "MTV not implemented for %s : %s collisions" ),
aA.Type(), aA.Type(),
aB.Type() ) ); aB.Type() ) );
@ -666,7 +666,7 @@ static inline bool Collide( const SHAPE_ARC& aA, const SHAPE_LINE_CHAIN_BASE& aB
static inline bool Collide( const SHAPE_ARC& aA, const SHAPE_ARC& aB, int aClearance, static inline bool Collide( const SHAPE_ARC& aA, const SHAPE_ARC& aB, int aClearance,
int* aActual, VECTOR2I* aLocation, VECTOR2I* aMTV ) int* aActual, VECTOR2I* aLocation, VECTOR2I* aMTV )
{ {
wxASSERT_MSG( !aMTV, wxString::Format( "MTV not implemented for %s : %s collisions", wxASSERT_MSG( !aMTV, wxString::Format( wxT( "MTV not implemented for %s : %s collisions" ),
aA.Type(), aA.Type(),
aB.Type() ) ); aB.Type() ) );
@ -968,7 +968,7 @@ static bool collideSingleShapes( const SHAPE* aA, const SHAPE* aB, int aClearanc
break; break;
} }
wxFAIL_MSG( wxString::Format( "Unsupported collision: %s with %s", wxFAIL_MSG( wxString::Format( wxT( "Unsupported collision: %s with %s" ),
SHAPE_TYPE_asString( aA->Type() ), SHAPE_TYPE_asString( aA->Type() ),
SHAPE_TYPE_asString( aB->Type() ) ) ); SHAPE_TYPE_asString( aB->Type() ) ) );

View File

@ -3,6 +3,7 @@
* *
* Copyright (C) 2013-2017 CERN * Copyright (C) 2013-2017 CERN
* Copyright (C) 2013-2022 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 2013-2022 KiCad Developers, see AUTHORS.txt for contributors.
*
* @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch> * @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
@ -202,7 +203,7 @@ void SHAPE_LINE_CHAIN::amendArc( size_t aArcIndex, const VECTOR2I& aNewStart,
const VECTOR2I& aNewEnd ) const VECTOR2I& aNewEnd )
{ {
wxCHECK_MSG( aArcIndex < m_arcs.size(), /* void */, wxCHECK_MSG( aArcIndex < m_arcs.size(), /* void */,
"Invalid arc index requested." ); wxT( "Invalid arc index requested." ) );
SHAPE_ARC& theArc = m_arcs[aArcIndex]; SHAPE_ARC& theArc = m_arcs[aArcIndex];
@ -227,7 +228,7 @@ void SHAPE_LINE_CHAIN::splitArc( ssize_t aPtIndex, bool aCoincident )
return; // Nothing to do return; // Nothing to do
wxCHECK_MSG( aPtIndex < static_cast<ssize_t>( m_shapes.size() ), /* void */, wxCHECK_MSG( aPtIndex < static_cast<ssize_t>( m_shapes.size() ), /* void */,
"Invalid point index requested." ); wxT( "Invalid point index requested." ) );
if( IsSharedPt( aPtIndex ) || IsArcEnd( aPtIndex ) ) if( IsSharedPt( aPtIndex ) || IsArcEnd( aPtIndex ) )
{ {
@ -408,7 +409,7 @@ bool SHAPE_LINE_CHAIN::Collide( const VECTOR2I& aP, int aClearance, int* aActual
const SHAPE_ARC& arc = Arc( i ); const SHAPE_ARC& arc = Arc( i );
// The arcs in the chain should have zero width // The arcs in the chain should have zero width
wxASSERT_MSG( arc.GetWidth() == 0, "Invalid arc width - should be zero" ); wxASSERT_MSG( arc.GetWidth() == 0, wxT( "Invalid arc width - should be zero" ) );
if( arc.Collide( aP, aClearance, aActual, aLocation ) ) if( arc.Collide( aP, aClearance, aActual, aLocation ) )
return true; return true;
@ -542,7 +543,7 @@ bool SHAPE_LINE_CHAIN::Collide( const SEG& aSeg, int aClearance, int* aActual,
const SHAPE_ARC& arc = Arc( i ); const SHAPE_ARC& arc = Arc( i );
// The arcs in the chain should have zero width // The arcs in the chain should have zero width
wxASSERT_MSG( arc.GetWidth() == 0, "Invalid arc width - should be zero" ); wxASSERT_MSG( arc.GetWidth() == 0, wxT( "Invalid arc width - should be zero" ) );
if( arc.Collide( aSeg, aClearance, aActual, aLocation ) ) if( arc.Collide( aSeg, aClearance, aActual, aLocation ) )
return true; return true;
@ -1160,7 +1161,8 @@ const SHAPE_LINE_CHAIN SHAPE_LINE_CHAIN::Slice( int aStartIndex, int aEndIndex )
} }
else else
{ {
wxASSERT_MSG( !IsArcSegment( i ), "Still on an arc segment, we missed something..." ); wxASSERT_MSG( !IsArcSegment( i ),
wxT( "Still on an arc segment, we missed something..." ) );
rv.Append( m_points[i] ); rv.Append( m_points[i] );
} }

View File

@ -3,6 +3,7 @@
* *
* Copyright (C) 2015-2019 CERN * Copyright (C) 2015-2019 CERN
* Copyright (C) 2021-2022 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 2021-2022 KiCad Developers, see AUTHORS.txt for contributors.
*
* @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch> * @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
* @author Alejandro García Montoro <alejandro.garciamontoro@gmail.com> * @author Alejandro García Montoro <alejandro.garciamontoro@gmail.com>
* *
@ -575,8 +576,8 @@ void SHAPE_POLY_SET::booleanOp( ClipperLib::ClipType aType, const SHAPE_POLY_SET
if( ( aShape.OutlineCount() > 1 || aOtherShape.OutlineCount() > 0 ) if( ( aShape.OutlineCount() > 1 || aOtherShape.OutlineCount() > 0 )
&& ( aShape.ArcCount() > 0 || aOtherShape.ArcCount() > 0 ) ) && ( aShape.ArcCount() > 0 || aOtherShape.ArcCount() > 0 ) )
{ {
wxFAIL_MSG( "Boolean ops on curved polygons are not supported. You should call " wxFAIL_MSG( wxT( "Boolean ops on curved polygons are not supported. You should call "
"ClearArcs() before carrying out the boolean operation." ); "ClearArcs() before carrying out the boolean operation." ) );
} }
ClipperLib::Clipper c; ClipperLib::Clipper c;
@ -1029,7 +1030,7 @@ void SHAPE_POLY_SET::fractureSingle( POLYGON& paths )
// If we can't handle the edge, the zone is broken (maybe) // If we can't handle the edge, the zone is broken (maybe)
if( !num_processed ) if( !num_processed )
{ {
wxLogWarning( "Broken polygon, dropping path" ); wxLogWarning( wxT( "Broken polygon, dropping path" ) );
for( FractureEdge* edge : edges ) for( FractureEdge* edge : edges )
delete edge; delete edge;

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2020 Ian McInerney <Ian.S.McInerney at ieee.org> * Copyright (C) 2020 Ian McInerney <Ian.S.McInerney at ieee.org>
* Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 2020-2022 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software: you can redistribute it and/or modify it * This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the * under the terms of the GNU General Public License as published by the
@ -80,8 +80,8 @@ wxString KIPLATFORM::ENV::GetDocumentsPath()
wxFileName fallback; wxFileName fallback;
fallback.AssignDir( g_get_home_dir() ); fallback.AssignDir( g_get_home_dir() );
fallback.AppendDir( ".local" ); fallback.AppendDir( wxT( ".local" ) );
fallback.AppendDir( "share" ); fallback.AppendDir( wxT( "share" ) );
fallback.MakeAbsolute(); fallback.MakeAbsolute();
docsPath = fallback.GetFullPath(); docsPath = fallback.GetFullPath();
@ -106,4 +106,4 @@ wxString KIPLATFORM::ENV::GetUserCachePath()
bool KIPLATFORM::ENV::GetSystemProxyConfig( const wxString& aURL, PROXY_CONFIG& aCfg ) bool KIPLATFORM::ENV::GetSystemProxyConfig( const wxString& aURL, PROXY_CONFIG& aCfg )
{ {
return false; return false;
} }

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2020 Ian McInerney <Ian.S.McInerney at ieee.org> * Copyright (C) 2020 Ian McInerney <Ian.S.McInerney at ieee.org>
* Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 2020-2022 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software: you can redistribute it and/or modify it * This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the * under the terms of the GNU General Public License as published by the
@ -200,7 +200,7 @@ bool KIPLATFORM::ENV::GetSystemProxyConfig( const wxString& aURL, PROXY_CONFIG&
// autoProxyInfo will return a list of proxies that are semicolon delimited // autoProxyInfo will return a list of proxies that are semicolon delimited
// todo...maybe figure out better selection logic // todo...maybe figure out better selection logic
wxString proxyList = autoProxyInfo.lpszProxy; wxString proxyList = autoProxyInfo.lpszProxy;
wxStringTokenizer tokenizer( proxyList, ";" ); wxStringTokenizer tokenizer( proxyList, wxT( ";" ) );
if( tokenizer.HasMoreTokens() ) if( tokenizer.HasMoreTokens() )
{ {

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2020 Ian McInerney <Ian.S.McInerney at ieee.org> * Copyright (C) 2020 Ian McInerney <Ian.S.McInerney at ieee.org>
* Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 2020-2022 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software: you can redistribute it and/or modify it * This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the * under the terms of the GNU General Public License as published by the
@ -68,7 +68,7 @@ void KIPLATFORM::UI::ReparentQuasiModal( wxNonOwnedWindow* aWindow )
wxTopLevelWindow* parent = wxTopLevelWindow* parent =
static_cast<wxTopLevelWindow*>( wxGetTopLevelParent( aWindow->GetParent() ) ); static_cast<wxTopLevelWindow*>( wxGetTopLevelParent( aWindow->GetParent() ) );
wxASSERT_MSG(parent, "QuasiModal windows require a parent."); wxASSERT_MSG(parent, wxT( "QuasiModal windows require a parent.") );
NSWindow* parentWindow = parent->GetWXWindow(); NSWindow* parentWindow = parent->GetWXWindow();
NSWindow* theWindow = aWindow->GetWXWindow(); NSWindow* theWindow = aWindow->GetWXWindow();