From 8ce0a84ca7454c0a993317aea2cbeb2b8d331a26 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 3 Feb 2023 08:22:34 +0100 Subject: [PATCH] Fix compatibility with older wxWidgets versions. Fix also a compil warning --- eeschema/sch_screen.cpp | 4 ++-- pcbnew/pcb_edit_frame.cpp | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/eeschema/sch_screen.cpp b/eeschema/sch_screen.cpp index e364a69ee1..29bdc420df 100644 --- a/eeschema/sch_screen.cpp +++ b/eeschema/sch_screen.cpp @@ -1586,12 +1586,12 @@ size_t SCH_SCREEN::getLibSymbolNameMatches( const SCH_SYMBOL& aSymbol, searchName = aSymbol.GetLibId().GetUniStringLibItemName() + wxS( "_" ); - int tmp; + long tmp; wxString suffix; for( auto pair : m_libSymbols ) { - if( pair.first.StartsWith( searchName, &suffix ) && suffix.ToInt( &tmp ) ) + if( pair.first.StartsWith( searchName, &suffix ) && suffix.ToLong( &tmp ) ) aMatches.emplace_back( pair.first ); } diff --git a/pcbnew/pcb_edit_frame.cpp b/pcbnew/pcb_edit_frame.cpp index a534173243..60e39bf7e6 100644 --- a/pcbnew/pcb_edit_frame.cpp +++ b/pcbnew/pcb_edit_frame.cpp @@ -4,7 +4,7 @@ * Copyright (C) 2018 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 2013 SoftPLC Corporation, Dick Hollenbeck * Copyright (C) 2013 Wayne Stambaugh - * Copyright (C) 2013-2022 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2013-2023 KiCad Developers, see AUTHORS.txt for contributors. * * 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 @@ -1099,7 +1099,9 @@ void PCB_EDIT_FRAME::doCloseWindow() // Remove the auto save file on a normal close of Pcbnew. if( fn.FileExists() && !wxRemoveFile( fn.GetFullPath() ) ) + { wxLogTrace( traceAutoSave, wxT( "The auto save file could not be removed!" ) ); + } // Make sure local settings are persisted SaveProjectSettings();