Avoid compil warning (when possible) about deprecated GetArchName() in wx >=3.1.5.

Use GetArchName() in wx >= 3.1.6.
This commit is contained in:
jean-pierre charras 2022-06-25 11:25:45 +02:00
parent 4e4b0962db
commit 4be4c5f4a1
2 changed files with 9 additions and 12 deletions

View File

@ -55,7 +55,11 @@ wxString GetPlatformGetBitnessName()
{ {
wxPlatformInfo platform; wxPlatformInfo platform;
// TODO (ISM): Read conditional once our wx fork and flatpaks are running released 3.1.5 // TODO (ISM): Read conditional once our wx fork and flatpaks are running released 3.1.5
#if 0 && wxCHECK_VERSION( 3, 1, 5 ) // On Windows, use GetBitnessName if exists
// I (J-PC) hope 3.1.6 has no problem
#if defined( __WINDOWS__ ) && wxCHECK_VERSION( 3, 1, 5 )
return platform.GetBitnessName();
#elif wxCHECK_VERSION( 3, 1, 6 )
return platform.GetBitnessName(); return platform.GetBitnessName();
#else #else
return platform.GetArchName(); return platform.GetArchName();

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) 2010 Rafael Sokolowski <Rafael.Sokolowski@web.de> * Copyright (C) 2010 Rafael Sokolowski <Rafael.Sokolowski@web.de>
* Copyright (C) 2010-2021 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 2010-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
@ -102,18 +102,11 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
wxPlatformInfo platformInfo; wxPlatformInfo platformInfo;
libVersion << "Platform: " << wxGetOsDescription() << ", " libVersion << "Platform: " << wxGetOsDescription() << ", "
// TODO (ISM): Readd conditional once our wx fork and flatpaks are running released 3.1.5 << GetPlatformGetBitnessName();
#if 0 && wxCHECK_VERSION( 3, 1, 5 )
<< platformInfo.GetBitnessName();
#else
<< platformInfo.GetArchName();
#endif
aInfo.SetLibVersion( libVersion ); aInfo.SetLibVersion( libVersion );
// info/description part HTML formatted:
/* info/description part HTML formatted */
wxString description; wxString description;
/* short description */ /* short description */