Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cdo
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mpim-sw
cdo
Commits
808511b6
Commit
808511b6
authored
2 months ago
by
Oliver Heidmann
Committed by
Uwe Schulzweida
2 months ago
Browse files
Options
Downloads
Patches
Plain Diff
fixed shadow warning for function argument optarg
parent
50604d5e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!299
Develop
,
!296
M300433/python interface merge cleanup1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/datetime.cc
+6
-6
6 additions, 6 deletions
src/datetime.cc
src/datetime.h
+1
-1
1 addition, 1 deletion
src/datetime.h
with
7 additions
and
7 deletions
src/datetime.cc
+
6
−
6
View file @
808511b6
...
...
@@ -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
;
}
...
...
This diff is collapsed.
Click to expand it.
src/datetime.h
+
1
−
1
View file @
808511b6
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment