Clean up compile warnings

Ratsnest did not need a reserve and then iterative emplace.  Instead, we
use resize().  Stroke font gets private vars initialized and kiway
variables that are only used in debug builds are properly scoped for
releases as well
This commit is contained in:
Seth Hillbrand 2019-12-05 20:05:21 -08:00
parent f5793c5984
commit ac92afcf13
3 changed files with 11 additions and 15 deletions

View File

@ -45,7 +45,7 @@ std::vector<BOX2D>* g_newStrokeFontGlyphBoundingBoxes; ///< Bounding boxes of
STROKE_FONT::STROKE_FONT( GAL* aGal ) :
m_gal( aGal )
m_gal( aGal ), m_glyphBoundingBoxes( {} ), m_glyphs( nullptr )
{
}

View File

@ -95,7 +95,6 @@ void KIWAY::SetTop( wxFrame* aTop )
const wxString KIWAY::dso_search_path( FACE_T aFaceId )
{
const char* name;
const char* dirName;
switch( aFaceId )
{
@ -112,13 +111,6 @@ const wxString KIWAY::dso_search_path( FACE_T aFaceId )
return wxEmptyString;
}
// The subdirectories usually have the same name as the kiface
switch( aFaceId )
{
case FACE_PL_EDITOR: dirName = "pagelayout_editor"; break;
default: dirName = name + 1; break;
}
#ifndef __WXMAC__
wxString path;
@ -153,6 +145,15 @@ const wxString KIWAY::dso_search_path( FACE_T aFaceId )
fn.AppendDir( wxT( "PlugIns" ) );
fn.SetName( name );
#else
const char* dirName;
// The subdirectories usually have the same name as the kiface
switch( aFaceId )
{
case FACE_PL_EDITOR: dirName = "pagelayout_editor"; break;
default: dirName = name + 1; break;
}
fn.RemoveLastDir();
fn.AppendDir( dirName );
#endif

View File

@ -211,7 +211,7 @@ public:
std::vector<ANCHOR_LIST> anchorChains;
triNodes.reserve( m_allNodes.size() );
anchorChains.reserve( m_allNodes.size() );
anchorChains.resize( m_allNodes.size() );
std::sort( m_allNodes.begin(), m_allNodes.end(),
[] ( const CN_ANCHOR_PTR& aNode1, const CN_ANCHOR_PTR& aNode2 )
@ -230,11 +230,6 @@ public:
CN_ANCHOR_PTR prev, last;
int id = 0;
for( const auto& n : m_allNodes )
{
anchorChains.emplace_back( );
}
for( const auto& n : m_allNodes )
{
if( !prev || prev->Pos() != n->Pos() )