#15400 closed defect (fixed)

enum GregorianAdoption - same value implicitly assigned

Reported by: wojdyr Owned by:
Priority: normal Milestone:
Component: base Version: stable-latest
Keywords: Cc:
Blocked By: Blocking:
Patch: no

Description

These warnings seem to be genuine bugs:

/home/wojdyr/local/include/wx-2.9/wx/datetime.h:236:9: warning: element
      Gr_Standard has been implicitly assigned 1 which another element has been
      assigned [-Wduplicate-enum]
        Gr_Standard,   // on the day 0 of Gregorian calendar: 15 Oct 1582
        ^~~~~~~~~~~
/home/wojdyr/local/include/wx-2.9/wx/datetime.h:242:9: note: element
      Gr_Austria_Brixen also has value 1
        Gr_Austria_Brixen,          // 5 Oct 1583 -> 16 Oct 1583
        ^~~~~~~~~~~~~~~~~
/home/wojdyr/local/include/wx-2.9/wx/datetime.h:251:9: note: element
      Gr_Bulgaria_1 also has value 1
        Gr_Bulgaria_1,         //      18 Mar 1916 -> 1 Apr 1916
        ^~~~~~~~~~~~~
/home/wojdyr/local/include/wx-2.9/wx/datetime.h:259:9: note: element Gr_China_1
      also has value 1
        Gr_China_1,            //      18 Dec 1911 -> 1 Jan 1912
        ^~~~~~~~~~
/home/wojdyr/local/include/wx-2.9/wx/datetime.h:274:9: note: element
      Gr_Germany_Catholic also has value 1
        Gr_Germany_Catholic,   //      1583-1585 (we take 1584)
        ^~~~~~~~~~~~~~~~~~~
/home/wojdyr/local/include/wx-2.9/wx/datetime.h:286:9: note: element Gr_Japan_1
      also has value 1
        Gr_Japan_1,            //      19 Dec 1872 -> 1 Jan 1873
        ^~~~~~~~~~
/home/wojdyr/local/include/wx-2.9/wx/datetime.h:333:9: note: element
      Gr_Switzerland_Catholic also has value 1
        Gr_Switzerland_Catholic,    //      1583, 1584 or 1597 (we take 1584)
        ^~~~~~~~~~~~~~~~~~~~~~~

(... and many more of similar warnings in this enum)

looking more into it, IsGregorianDate() is declared/documented but not implemented. So that enum is not used.

Change History (1)

comment:1 Changed 12 months ago by VZ

  • Resolution set to fixed
  • Status changed from new to closed

(In [74648]) Remove never implemented wxDateTime::IsGregorianDate().

This method was declared and even documented but never actually implemented,
and GregorianAdoption enum used by it had many incorrectly defined elements.

Just remove both the method and the enum instead of fixing/implementing them
as they are not that important (as witnessed by the fact that nobody has
complained about the method being missing since almost 15 years).

Closes #15400.

Note: See TracTickets for help on using tickets.