From ea4cee3393c228164588b0133068af1e9965a25a Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Fri, 9 Mar 2018 10:30:47 -0800 Subject: [PATCH] Set Eagle import generated timestamps to KiCad std --- common/eagle_parser.cpp | 8 ++++---- include/eagle_parser.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/common/eagle_parser.cpp b/common/eagle_parser.cpp index e8cdbd2bc9..8026f1de11 100644 --- a/common/eagle_parser.cpp +++ b/common/eagle_parser.cpp @@ -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( aTree ); + return (timestamp_t) reinterpret_cast( 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{}( aName ); std::size_t h2 = std::hash{}( aValue ); std::size_t h3 = std::hash{}( aUnit ); - return (unsigned int)( h1 ^ (h2 << 1) ^ (h3 << 2) ); + return (timestamp_t)( h1 ^ (h2 << 1) ^ (h3 << 2) ); } diff --git a/include/eagle_parser.h b/include/eagle_parser.h index 0ce823900f..1bf9f5c379 100644 --- a/include/eagle_parser.h +++ b/include/eagle_parser.h @@ -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 );