Use 32-bit timestamps for imported Eagle files
Fixes: lp:1754610 * https://bugs.launchpad.net/kicad/+bug/1754610
This commit is contained in:
parent
3fcc84dde3
commit
30a78f00bc
|
@ -258,20 +258,20 @@ NODE_MAP MapChildren( wxXmlNode* aCurrentNode )
|
|||
}
|
||||
|
||||
|
||||
unsigned long EagleTimeStamp( wxXmlNode* aTree )
|
||||
unsigned int EagleTimeStamp( wxXmlNode* aTree )
|
||||
{
|
||||
// in this case from a unique tree memory location
|
||||
return (unsigned long)(void*) aTree;
|
||||
return (unsigned int) reinterpret_cast<uintptr_t>( aTree );
|
||||
}
|
||||
|
||||
|
||||
time_t EagleModuleTstamp( const wxString& aName, const wxString& aValue, int aUnit )
|
||||
unsigned int EagleModuleTstamp( const wxString& aName, const wxString& aValue, int aUnit )
|
||||
{
|
||||
std::size_t h1 = std::hash<wxString>{}( aName );
|
||||
std::size_t h2 = std::hash<wxString>{}( aValue );
|
||||
std::size_t h3 = std::hash<int>{}( aUnit );
|
||||
|
||||
return h1 ^ (h2 << 1) ^ (h3 << 2);
|
||||
return (unsigned int)( h1 ^ (h2 << 1) ^ (h3 << 2) );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -364,13 +364,13 @@ public:
|
|||
*/
|
||||
NODE_MAP MapChildren( wxXmlNode* aCurrentNode );
|
||||
|
||||
/// Make a unique time stamp
|
||||
unsigned long EagleTimeStamp( wxXmlNode* aTree );
|
||||
///> Make a unique time stamp
|
||||
unsigned int EagleTimeStamp( wxXmlNode* aTree );
|
||||
|
||||
/// Computes module timestamp basing on its name, value and unit
|
||||
time_t EagleModuleTstamp( const wxString& aName, const wxString& aValue, int aUnit );
|
||||
///> Computes module timestamp basing on its name, value and unit
|
||||
unsigned int EagleModuleTstamp( const wxString& aName, const wxString& aValue, int aUnit );
|
||||
|
||||
/// Convert an Eagle curve end to a KiCad center for S_ARC
|
||||
///> Convert an Eagle curve end to a KiCad center for S_ARC
|
||||
wxPoint ConvertArcCenter( const wxPoint& aStart, const wxPoint& aEnd, double aAngle );
|
||||
|
||||
// Pre-declare for typedefs
|
||||
|
|
Loading…
Reference in New Issue