forked from HowardHinnant/date
test/solar_hijri_test/parse.pass.cpp: specify unsigned type in loop
This fixes the warning ``` parse.pass.cpp:218:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare] 218 | for (auto i = 0; i < sizeof(ymdd)/sizeof(ymdd[0]); ++i) | ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ```
This commit is contained in:
@@ -215,7 +215,7 @@ test_g() {
|
||||
static_assert(sizeof(ymdd)/sizeof(ymdd[0]) == sizeof(ymdh)/sizeof(ymdh[0]), "");
|
||||
static_assert(sizeof(ymdd)/sizeof(ymdd[0]) == sizeof(leaps)/sizeof(leaps[0]), "");
|
||||
|
||||
for (auto i = 0; i < sizeof(ymdd)/sizeof(ymdd[0]); ++i)
|
||||
for (auto i = 0u; i < sizeof(ymdd)/sizeof(ymdd[0]); ++i)
|
||||
{
|
||||
assert(solar_hijri::year_month_day{ymdd[i]} == ymdh[i]);
|
||||
assert(ymdd[i] == date::year_month_day{ymdh[i]});
|
||||
|
Reference in New Issue
Block a user