Skip to content
Snippets Groups Projects
Commit 58451759 authored by Oliver Heidmann's avatar Oliver Heidmann
Browse files

fixed shadow warning for function argument optarg

parent c20f87dc
No related branches found
No related tags found
No related merge requests found
Pipeline #93892 failed
......@@ -37,18 +37,18 @@ time_units_cstr(TimeUnits timeUnit)
}
void
set_timestat_date(const std::string &optarg)
set_timestat_date(const std::string &p_optarg)
{
TimeStat timestatdate = TimeStat::UNDEF;
// clang-format off
if (optarg == "first") timestatdate = TimeStat::FIRST;
else if (optarg == "last") timestatdate = TimeStat::LAST;
else if (optarg == "middle") timestatdate = TimeStat::MEAN;
else if (optarg == "midhigh") timestatdate = TimeStat::MIDHIGH;
if (p_optarg == "first") timestatdate = TimeStat::FIRST;
else if (p_optarg == "last") timestatdate = TimeStat::LAST;
else if (p_optarg == "middle") timestatdate = TimeStat::MEAN;
else if (p_optarg == "midhigh") timestatdate = TimeStat::MIDHIGH;
// clang-format on
if (timestatdate == TimeStat::UNDEF) cdo_abort("option --%s: unsupported argument: %s", "timestat_date", optarg);
if (timestatdate == TimeStat::UNDEF) cdo_abort("option --%s: unsupported argument: %s", "timestat_date", p_optarg);
CDO_Timestat_Date = timestatdate;
}
......
......@@ -111,7 +111,7 @@ private:
};
CdiDateTime datetime_avg(int calendar, int ndates, const std::vector<CdiDateTime> &cdiDateTimes);
void set_timestat_date(const std::string &optarg);
void set_timestat_date(const std::string &p_optarg);
void adjust_month_and_year(int &month, int &year);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment