Fix compatibility issues with wxWidgets 3.2 and gcc 12.1:
hastable.h: remove deprecated binary/unary base class not actually needed. Fix compil warnings. From master branch.
This commit is contained in:
parent
fd65bd8e6e
commit
926818097b
|
@ -27,13 +27,12 @@
|
||||||
|
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
#include <eda_rect.h>
|
|
||||||
#include <wx/string.h>
|
#include <wx/string.h>
|
||||||
|
|
||||||
// First some utility classes and functions
|
// First some utility classes and functions
|
||||||
|
|
||||||
/// Equality test for "const char*" type used in very specialized KEYWORD_MAP below
|
/// Equality test for "const char*" type used in very specialized KEYWORD_MAP below
|
||||||
struct iequal_to : std::binary_function< const char*, const char*, bool >
|
struct iequal_to
|
||||||
{
|
{
|
||||||
bool operator()( const char* x, const char* y ) const
|
bool operator()( const char* x, const char* y ) const
|
||||||
{
|
{
|
||||||
|
@ -77,7 +76,7 @@ struct fnv_1a
|
||||||
|
|
||||||
|
|
||||||
/// Hash function for wxString, counterpart of std::string hash
|
/// Hash function for wxString, counterpart of std::string hash
|
||||||
struct WXSTRING_HASH : std::unary_function<wxString, std::size_t>
|
struct WXSTRING_HASH
|
||||||
{
|
{
|
||||||
std::size_t operator()( const wxString& aString ) const
|
std::size_t operator()( const wxString& aString ) const
|
||||||
{
|
{
|
||||||
|
@ -128,9 +127,5 @@ struct WXSTRING_HASH : std::unary_function<wxString, std::size_t>
|
||||||
*/
|
*/
|
||||||
typedef std::unordered_map< const char*, int, fnv_1a, iequal_to > KEYWORD_MAP;
|
typedef std::unordered_map< const char*, int, fnv_1a, iequal_to > KEYWORD_MAP;
|
||||||
|
|
||||||
/// Map a C string to an EDA_RECT.
|
|
||||||
/// The key is the classname of the derived wxformbuilder dialog.
|
|
||||||
typedef std::unordered_map< std::string, EDA_RECT > RECT_MAP;
|
|
||||||
|
|
||||||
|
|
||||||
#endif // HASHTABLES_H_
|
#endif // HASHTABLES_H_
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
|
|
||||||
#include <wx/string.h>
|
#include <wx/string.h>
|
||||||
#include <wx/xml/xml.h>
|
#include <wx/xml/xml.h>
|
||||||
|
#include <wx/wxcrt.h> // for wxFopen
|
||||||
|
|
||||||
namespace PCAD2KICAD {
|
namespace PCAD2KICAD {
|
||||||
|
|
||||||
|
|
|
@ -2546,7 +2546,7 @@ void PCB_SELECTION_TOOL::GuessSelectionCandidates( GENERAL_COLLECTOR& aCollector
|
||||||
for( int i = 0; i < aCollector.GetCount(); ++i )
|
for( int i = 0; i < aCollector.GetCount(); ++i )
|
||||||
{
|
{
|
||||||
BOARD_ITEM* item = aCollector[i];
|
BOARD_ITEM* item = aCollector[i];
|
||||||
double area;
|
double area = 0.0;
|
||||||
|
|
||||||
if( ( item->Type() == PCB_ZONE_T || item->Type() == PCB_FP_ZONE_T )
|
if( ( item->Type() == PCB_ZONE_T || item->Type() == PCB_FP_ZONE_T )
|
||||||
&& static_cast<ZONE*>( item )->HitTestForEdge( where, MAX_SLOP * pixel / 2 ) )
|
&& static_cast<ZONE*>( item )->HitTestForEdge( where, MAX_SLOP * pixel / 2 ) )
|
||||||
|
|
Loading…
Reference in New Issue