CPP: Add the new Japanese era.

This commit is contained in:
Geoffrey White
2019-09-03 17:44:03 +01:00
parent bac39e6288
commit 3a3bef3a03
4 changed files with 21 additions and 9 deletions

View File

@@ -38,6 +38,6 @@ int Main()
// GOOD: method call with the same parameters in a different order (we only track year, month, day)
EraInfo * pDateTimeUtil4 = EraInfo::EraInfoFromDate(1, 2, 8, 1, 1989, L"\u5e73\u6210");
// BAD: constructor creating a EraInfo with exact Reiwa era start date [NOT DETECTED]
// BAD: constructor creating a EraInfo with exact Reiwa era start date
EraInfo * pDateTimeUtil5 = new EraInfo(2019, 5, 1);
}

View File

@@ -1,5 +1,7 @@
| ConstructorOrMethodWithExactDate.cpp:27:31:27:53 | call to EraInfo | Call that appears to have hard-coded Japanese era start date as parameter. |
| ConstructorOrMethodWithExactDate.cpp:30:32:30:77 | call to EraInfo | Call that appears to have hard-coded Japanese era start date as parameter. |
| ConstructorOrMethodWithExactDate.cpp:36:32:36:55 | call to EraInfoFromDate | Call that appears to have hard-coded Japanese era start date as parameter. |
| ConstructorOrMethodWithExactDate.cpp:42:32:42:54 | call to EraInfo | Call that appears to have hard-coded Japanese era start date as parameter. |
| StructWithExactDate.cpp:31:13:31:19 | tm_year | A time struct that is initialized with exact Japanese calendar era start date. |
| StructWithExactDate.cpp:46:8:46:12 | wYear | A time struct that is initialized with exact Japanese calendar era start date. |
| StructWithExactDate.cpp:60:9:60:13 | wYear | A time struct that is initialized with exact Japanese calendar era start date. |

View File

@@ -53,7 +53,7 @@ int main()
st1.wYear = 1990;
// BAD: Creation of SYSTEMTIME stuct corresponding to the beginning of Reiwa era [NOT DETECTED]
// BAD: Creation of SYSTEMTIME stuct corresponding to the beginning of Reiwa era
SYSTEMTIME st2;
st2.wDay = 1;
st2.wMonth = 5;