Set Eagle import generated timestamps to KiCad std

This commit is contained in:
Seth Hillbrand 2018-03-09 10:30:47 -08:00
parent 3d27dbdcbb
commit ea4cee3393
2 changed files with 6 additions and 6 deletions

View File

@ -258,20 +258,20 @@ NODE_MAP MapChildren( wxXmlNode* aCurrentNode )
}
unsigned int EagleTimeStamp( wxXmlNode* aTree )
timestamp_t EagleTimeStamp( wxXmlNode* aTree )
{
// in this case from a unique tree memory location
return (unsigned int) reinterpret_cast<uintptr_t>( aTree );
return (timestamp_t) reinterpret_cast<uintptr_t>( aTree );
}
unsigned int EagleModuleTstamp( const wxString& aName, const wxString& aValue, int aUnit )
timestamp_t 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 (unsigned int)( h1 ^ (h2 << 1) ^ (h3 << 2) );
return (timestamp_t)( h1 ^ (h2 << 1) ^ (h3 << 2) );
}

View File

@ -365,10 +365,10 @@ public:
NODE_MAP MapChildren( wxXmlNode* aCurrentNode );
///> Make a unique time stamp
unsigned int EagleTimeStamp( wxXmlNode* aTree );
timestamp_t EagleTimeStamp( wxXmlNode* aTree );
///> Computes module timestamp basing on its name, value and unit
unsigned int EagleModuleTstamp( const wxString& aName, const wxString& aValue, int aUnit );
timestamp_t EagleModuleTstamp( const wxString& aName, const wxString& aValue, int aUnit );
///> Convert an Eagle curve end to a KiCad center for S_ARC
wxPoint ConvertArcCenter( const wxPoint& aStart, const wxPoint& aEnd, double aAngle );