diff options
author | Tom Sepez <tsepez@chromium.org> | 2016-03-21 15:00:20 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2016-03-21 15:00:20 -0700 |
commit | 62a70f90c49cf7714c960186eb063ad55333e6f3 (patch) | |
tree | 84b5d0f70b770e6a9ec261342d46638f4d5102bd /fpdfsdk/fsdk_baseannot.cpp | |
parent | 4161c5ca6c5438476bf07b6dacfafb61ea611cc5 (diff) | |
download | pdfium-62a70f90c49cf7714c960186eb063ad55333e6f3.tar.xz |
Remove FX_WORD in favor of uint16_t.
It isn't buying us anthing, and it looks strange in
a struct when other uint types are already present.
R=dsinclair@chromium.org
Review URL: https://codereview.chromium.org/1821043003 .
Diffstat (limited to 'fpdfsdk/fsdk_baseannot.cpp')
-rw-r--r-- | fpdfsdk/fsdk_baseannot.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/fpdfsdk/fsdk_baseannot.cpp b/fpdfsdk/fsdk_baseannot.cpp index 942751d7df..1494c3908c 100644 --- a/fpdfsdk/fsdk_baseannot.cpp +++ b/fpdfsdk/fsdk_baseannot.cpp @@ -27,7 +27,7 @@ FX_BOOL _gAfxIsLeapYear(int16_t year) { return ((year % 400 == 0) || ((year % 4 == 0) && (year % 100 != 0))); } -FX_WORD _gAfxGetYearDays(int16_t year) { +uint16_t _gAfxGetYearDays(int16_t year) { return (_gAfxIsLeapYear(year) == TRUE ? 366 : 365); } @@ -373,13 +373,13 @@ void CPDFSDK_DateTime::ToSystemTime(FX_SYSTEMTIME& st) { time_t t = (time_t)dt; struct tm* pTime = localtime(&t); if (pTime) { - st.wYear = (FX_WORD)pTime->tm_year + 1900; - st.wMonth = (FX_WORD)pTime->tm_mon + 1; - st.wDay = (FX_WORD)pTime->tm_mday; - st.wDayOfWeek = (FX_WORD)pTime->tm_wday; - st.wHour = (FX_WORD)pTime->tm_hour; - st.wMinute = (FX_WORD)pTime->tm_min; - st.wSecond = (FX_WORD)pTime->tm_sec; + st.wYear = (uint16_t)pTime->tm_year + 1900; + st.wMonth = (uint16_t)pTime->tm_mon + 1; + st.wDay = (uint16_t)pTime->tm_mday; + st.wDayOfWeek = (uint16_t)pTime->tm_wday; + st.wHour = (uint16_t)pTime->tm_hour; + st.wMinute = (uint16_t)pTime->tm_min; + st.wSecond = (uint16_t)pTime->tm_sec; st.wMilliseconds = 0; } } @@ -404,7 +404,7 @@ CPDFSDK_DateTime& CPDFSDK_DateTime::AddDays(short days) { ldays = days; if (ldays > 0) { yy = y; - if (((FX_WORD)m * 100 + d) > 300) + if (((uint16_t)m * 100 + d) > 300) yy++; ydays = _gAfxGetYearDays(yy); while (ldays >= ydays) { @@ -429,7 +429,7 @@ CPDFSDK_DateTime& CPDFSDK_DateTime::AddDays(short days) { } else { ldays *= -1; yy = y; - if (((FX_WORD)m * 100 + d) < 300) + if (((uint16_t)m * 100 + d) < 300) yy--; ydays = _gAfxGetYearDays(yy); while (ldays >= ydays) { |