← Back to team overview

kicad-developers team mailing list archive

[PATCH] Reworking patchlets, first issue

 

Keeping alterations separate is a lot of work, since refactoring tends
to be a recursive process... anyway, these are the first 'palatable'
patches:

001     why the PROPERTIES hash has char* instead of const char* as
        index? I get deprecation warning on usages like m_prop["header"]

        similarly I get ambiguous warning on the + '\n' + usage, which
        is easily fixed with wxChar( '\n' ) (the message is funny, too)

002     MIN_PAGE_SIZE and MAX_PAGE_SIZE from #define to const inside
        PAGE_INFO. 

        s_gost became is a const

        The ON and OFF defines replaced with the obvious true and false
        bool

003     Timestamps (the numeric ones) became time_t (before they were
        a mix on long/unsigned long/int... why some other timestamps are
        wxDateTime? the netlist reader uses directly the hex string
        form, too

004     The various flags in EDA_ITEM (m_status and m_Flags... why two
        sets?) became and enum in EDA_ITEM

005     Two relic defines from bitmaps_h removed

006     Two const added

007     Renamed BASE_SCREEN::m_NumberOfScreen to
        BASE_SCREEN::m_NumberOfScreens (otherwise you get mad
        with m_ScreenNumber too!)

        Removed BASE_SCREEN::m_FlagRefreshReq which was wholly unused

        Some const

008     MODULE::m_LastEdit_Time became a time_t too. Also added an
        overloaded SetLastEditTime member which sets it to the current
        time (the most frequent usage)

009     The drawmode (GR_COPY, GR_XOR and so on) became an enum. Luckily
        wxCOPY has probably the same zero value of GR_COPY since it was
        used a couple of time

010     EDA_COLOR_T made pervasive (an enum can always be assigned to
        an int but the reverse in newer g++ is an *error*)

-- 
Lorenzo Marcantonio
Logos Srl

Attachment: rework-001-010.tar.bz2
Description: Binary data


Follow ups