diff --git a/gerbview/gerbview.h b/gerbview/gerbview.h index 554c6aeb51..48ef6186e5 100644 --- a/gerbview/gerbview.h +++ b/gerbview/gerbview.h @@ -275,7 +275,7 @@ public: bool m_PolygonFillMode; // Enbl polygon mode (read coord as a polygone descr) int m_PolygonFillModeState; // In polygon mode: 0 = first segm, 1 = next segm - APERTURE_MACRO_SET m_aperture_macros; + APERTURE_MACRO_SET m_aperture_macros; ///< a collection of APERTURE_MACROS, sorted by name public: GERBER( int layer ); diff --git a/gerbview/rs274x.cpp b/gerbview/rs274x.cpp index 4b1510469f..c1c19848df 100644 --- a/gerbview/rs274x.cpp +++ b/gerbview/rs274x.cpp @@ -73,22 +73,16 @@ static int ReadXCommand( char*& text ) /** * Function ReadInt - * reads an int from an ASCII character buffer. + * reads an int from an ASCII character buffer. If there is a comma after the + * int, then skip over that. * @param text A reference to a character pointer from which bytes are read * and the pointer is advanced for each byte read. * @param int - The int read in. */ static int ReadInt( char*& text ) { - char* start = text; - int ret = (int) strtol( text, &text, 10 ); -/* - if( text == start ) // no conversion was performed, skip one character forward - ++text; -*/ - if( *text == ',' ) ++text; @@ -98,22 +92,16 @@ static int ReadInt( char*& text ) /** * Function ReadDouble - * reads a double in from a character buffer. + * reads a double in from a character buffer. If there is a comma after the double, + * then skip over that. * @param text A reference to a character pointer from which the ASCII double * is read from and the pointer advanced for each character read. * @return double */ static double ReadDouble( char*& text ) { - char* start = text; - double ret = strtod( text, &text ); -/* - if( text == start ) // no conversion was performed, skip one character forward - ++text; -*/ - if( *text == ',' ) ++text;