mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-19 00:21:36 +00:00
Use our own hash function rather than boost::hash
I just wanted to get a fairly chonky Boost include out of a header, but then I noticed this doesn't need to use Boost at all.
This commit is contained in:
parent
4388df6c25
commit
2815c99a2a
@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@gmail.com>
|
||||
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2024 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
|
||||
@ -27,7 +27,9 @@
|
||||
* @file erc_sch_pin_context.cpp
|
||||
*/
|
||||
|
||||
#include <erc/erc_sch_pin_context.h>
|
||||
#include "erc/erc_sch_pin_context.h"
|
||||
|
||||
#include <hash.h>
|
||||
|
||||
|
||||
SCH_PIN* ERC_SCH_PIN_CONTEXT::Pin() const
|
||||
@ -57,7 +59,5 @@ bool ERC_SCH_PIN_CONTEXT::operator<( const ERC_SCH_PIN_CONTEXT& other ) const
|
||||
void ERC_SCH_PIN_CONTEXT::rehash()
|
||||
{
|
||||
m_hash = 0;
|
||||
|
||||
boost::hash_combine( m_hash, m_pin );
|
||||
boost::hash_combine( m_hash, m_sheet.GetCurrentHash() );
|
||||
hash_combine( m_hash, m_pin, m_sheet.GetCurrentHash() );
|
||||
}
|
||||
|
@ -31,7 +31,6 @@
|
||||
#define _ERC_ITEM_CONTEXT_H
|
||||
|
||||
#include <sch_pin.h>
|
||||
#include <boost/functional/hash.hpp>
|
||||
|
||||
/**
|
||||
* A class used to associate a #SCH_PIN with its owning #SCH_SHEET_PATH, in order to handle ERC
|
||||
|
@ -24,6 +24,7 @@
|
||||
*/
|
||||
|
||||
#include <refdes_utils.h>
|
||||
#include <hash.h>
|
||||
#include <sch_screen.h>
|
||||
#include <sch_item.h>
|
||||
#include <sch_marker.h>
|
||||
@ -37,7 +38,6 @@
|
||||
#include <template_fieldnames.h>
|
||||
#include <trace_helpers.h>
|
||||
|
||||
#include <boost/functional/hash.hpp>
|
||||
#include <wx/filename.h>
|
||||
#include <wx/log.h>
|
||||
|
||||
@ -161,7 +161,7 @@ void SCH_SHEET_PATH::Rehash()
|
||||
m_current_hash = 0;
|
||||
|
||||
for( SCH_SHEET* sheet : m_sheets )
|
||||
boost::hash_combine( m_current_hash, sheet->m_Uuid.Hash() );
|
||||
hash_combine( m_current_hash, sheet->m_Uuid.Hash() );
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user