mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-13 08:53:20 +00:00
ICU-2424 fix compiler warnings
X-SVN-Rev: 14266
This commit is contained in:
parent
401319fc06
commit
b93c3619d9
5 changed files with 23 additions and 23 deletions
|
@ -203,7 +203,7 @@ const double CalendarAstronomer::PI = 3.14159265358979323846;
|
|||
* @deprecated ICU 2.4. This class may be removed or modified.
|
||||
*/
|
||||
CalendarAstronomer::CalendarAstronomer():
|
||||
fTime(Calendar::getNow()), moonPosition(0,0), moonPositionSet(FALSE), fLongitude(0.0), fLatitude(0.0), fGmtOffset(0.0) {
|
||||
fTime(Calendar::getNow()), fLongitude(0.0), fLatitude(0.0), fGmtOffset(0.0), moonPosition(0,0), moonPositionSet(FALSE) {
|
||||
clearCache();
|
||||
}
|
||||
|
||||
|
@ -213,7 +213,7 @@ CalendarAstronomer::CalendarAstronomer():
|
|||
* @internal
|
||||
* @deprecated ICU 2.4. This class may be removed or modified.
|
||||
*/
|
||||
CalendarAstronomer::CalendarAstronomer(UDate d): fTime(d),moonPosition(0,0), moonPositionSet(FALSE), fLongitude(0.0), fLatitude(0.0), fGmtOffset(0.0) {
|
||||
CalendarAstronomer::CalendarAstronomer(UDate d): fTime(d), fLongitude(0.0), fLatitude(0.0), fGmtOffset(0.0), moonPosition(0,0), moonPositionSet(FALSE) {
|
||||
clearCache();
|
||||
}
|
||||
|
||||
|
@ -567,12 +567,12 @@ double CalendarAstronomer::getSunLongitude()
|
|||
/**
|
||||
* TODO Make this public when the entire class is package-private.
|
||||
*/
|
||||
/*public*/ void CalendarAstronomer::getSunLongitude(double julianDay, double &longitude, double &meanAnomaly)
|
||||
/*public*/ void CalendarAstronomer::getSunLongitude(double jDay, double &longitude, double &meanAnomaly)
|
||||
{
|
||||
// See page 86 of "Practial Astronomy with your Calculator",
|
||||
// by Peter Duffet-Smith, for details on the algorithm.
|
||||
|
||||
double day = julianDay - JD_EPOCH; // Days since epoch
|
||||
double day = jDay - JD_EPOCH; // Days since epoch
|
||||
|
||||
// Find the angular distance the sun in a fictitious
|
||||
// circular orbit has travelled since the epoch.
|
||||
|
@ -994,7 +994,7 @@ const CalendarAstronomer::Equatorial& CalendarAstronomer::getMoonPosition()
|
|||
if (moonPositionSet == FALSE) {
|
||||
// Calculate the solar longitude. Has the side effect of
|
||||
// filling in "meanAnomalySun" as well.
|
||||
double sunLongitude = getSunLongitude();
|
||||
getSunLongitude();
|
||||
|
||||
//
|
||||
// Find the # of days since the epoch of our orbital parameters.
|
||||
|
@ -1005,7 +1005,7 @@ const CalendarAstronomer::Equatorial& CalendarAstronomer::getMoonPosition()
|
|||
// Calculate the mean longitude and anomaly of the moon, based on
|
||||
// a circular orbit. Similar to the corresponding solar calculation.
|
||||
double meanLongitude = norm2PI(13.1763966*PI/180*day + moonL0);
|
||||
double meanAnomalyMoon = norm2PI(meanLongitude - 0.1114041*PI/180 * day - moonP0);
|
||||
meanAnomalyMoon = norm2PI(meanLongitude - 0.1114041*PI/180 * day - moonP0);
|
||||
|
||||
//
|
||||
// Calculate the following corrections:
|
||||
|
@ -1522,7 +1522,7 @@ void CalendarCache::put(CalendarCache** cache, int32_t key, int32_t value, UErro
|
|||
}
|
||||
|
||||
CalendarCache::CalendarCache(int32_t size, UErrorCode &status) {
|
||||
fTable = uhash_openSize(uhash_hashLong, uhash_compareLong, 32, &status);
|
||||
fTable = uhash_openSize(uhash_hashLong, uhash_compareLong, size, &status);
|
||||
U_DEBUG_ASTRO_MSG(("%p: Opening.\n", fTable));
|
||||
}
|
||||
|
||||
|
|
|
@ -812,9 +812,9 @@ GregorianCalendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& s
|
|||
|
||||
// J81 processing. (gregorian cutover)
|
||||
UBool inCutoverMonth = FALSE;
|
||||
int32_t cMonthLen; // 'c' for cutover; in days
|
||||
int32_t cDayOfMonth; // no discontinuity: [0, cMonthLen)
|
||||
double cMonthStart; // in ms
|
||||
int32_t cMonthLen=0; // 'c' for cutover; in days
|
||||
int32_t cDayOfMonth=0; // no discontinuity: [0, cMonthLen)
|
||||
double cMonthStart=0.0; // in ms
|
||||
|
||||
// Common code - see if we're in the cutover month of the cutover year
|
||||
if(internalGet(UCAL_EXTENDED_YEAR) == fGregorianCutoverYear) {
|
||||
|
|
|
@ -579,7 +579,7 @@ int32_t HebrewCalendar::handleGetExtendedYear() {
|
|||
* Return JD of start of given month/year.
|
||||
* @internal
|
||||
*/
|
||||
int32_t HebrewCalendar::handleComputeMonthStart(int32_t eyear, int32_t month, UBool useMonth) const {
|
||||
int32_t HebrewCalendar::handleComputeMonthStart(int32_t eyear, int32_t month, UBool /*useMonth*/) const {
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
// Resolve out-of-range months. This is necessary in order to
|
||||
// obtain the correct year. We correct to
|
||||
|
|
|
@ -479,6 +479,6 @@ U_NAMESPACE_END
|
|||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
||||
#endif // _GREGOCAL
|
||||
#endif
|
||||
//eof
|
||||
|
||||
|
|
|
@ -163,17 +163,17 @@ void CalendarCaseTest::IslamicCivil()
|
|||
}
|
||||
|
||||
void CalendarCaseTest::Hebrew() {
|
||||
static const int32_t TISHRI = HebrewCalendar::TISHRI;
|
||||
static const int32_t HESHVAN = HebrewCalendar::HESHVAN;
|
||||
static const int32_t KISLEV = HebrewCalendar::KISLEV;
|
||||
static const int32_t TEVET = HebrewCalendar::TEVET;
|
||||
static const int32_t SHEVAT = HebrewCalendar::SHEVAT;
|
||||
static const int32_t ADAR_1 = HebrewCalendar::ADAR_1;
|
||||
static const int32_t ADAR = HebrewCalendar::ADAR;
|
||||
static const int32_t NISAN = HebrewCalendar::NISAN;
|
||||
static const int32_t IYAR = HebrewCalendar::IYAR;
|
||||
static const int32_t SIVAN = HebrewCalendar::SIVAN;
|
||||
static const int32_t TAMUZ = HebrewCalendar::TAMUZ;
|
||||
static const int32_t TISHRI = HebrewCalendar::TISHRI;
|
||||
// static const int32_t HESHVAN = HebrewCalendar::HESHVAN;
|
||||
// static const int32_t KISLEV = HebrewCalendar::KISLEV;
|
||||
// static const int32_t TEVET = HebrewCalendar::TEVET;
|
||||
// static const int32_t SHEVAT = HebrewCalendar::SHEVAT;
|
||||
// static const int32_t ADAR_1 = HebrewCalendar::ADAR_1;
|
||||
// static const int32_t ADAR = HebrewCalendar::ADAR;
|
||||
// static const int32_t NISAN = HebrewCalendar::NISAN;
|
||||
// static const int32_t IYAR = HebrewCalendar::IYAR;
|
||||
// static const int32_t SIVAN = HebrewCalendar::SIVAN;
|
||||
// static const int32_t TAMUZ = HebrewCalendar::TAMUZ;
|
||||
static const int32_t AV = HebrewCalendar::AV;
|
||||
static const int32_t ELUL = HebrewCalendar::ELUL;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue