Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
oai-cn5g-common-src
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
oai
cn5g
oai-cn5g-common-src
Merge requests
!30
Fix compiler warnings
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Fix compiler warnings
fix_pcf_warnings
into
develop
Overview
0
Commits
2
Pipelines
0
Changes
4
Merged
Stefan Spettel
requested to merge
fix_pcf_warnings
into
develop
1 year ago
Overview
0
Commits
2
Pipelines
0
Changes
4
Expand
Changes
Make formatter functions normal namespace functions (non static)
Remove unused
json
parameters
Fix
Fixes unused function and unused parameter compile-time warnings (see
oai-cn5g-pcf#10
)
0
0
Merge request reports
Compare
develop
version 1
1f8b96e0
1 year ago
develop (base)
and
latest version
latest version
e72b033e
2 commits,
1 year ago
version 1
1f8b96e0
1 commit,
1 year ago
4 files
+
41
−
31
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
config/config.cpp
+
27
−
0
Options
@@ -378,3 +378,30 @@ void config::update_used_nfs() {
}
}
}
std
::
string
oai
::
config
::
get_value_formatter
(
int
level
)
{
{
// TODO use this function everywhere, it is much simpler
int
indent_width
=
level
*
INDENT_WIDTH
;
std
::
string
base_indent
=
fmt
::
format
(
"{:<{}}"
,
""
,
indent_width
);
std
::
string
indent_char
=
(
level
+
1
)
%
2
==
0
?
INNER_LIST_ELEM
:
OUTER_LIST_ELEM
;
unsigned
int
inner_width
=
COLUMN_WIDTH
;
if
(
base_indent
.
length
()
<
COLUMN_WIDTH
)
{
inner_width
=
COLUMN_WIDTH
-
base_indent
.
length
();
}
return
base_indent
+
indent_char
+
" {:.<"
+
std
::
to_string
(
inner_width
)
+
"}: {}
\n
"
;
}
}
std
::
string
oai
::
config
::
get_title_formatter
(
int
level
)
{
{
int
indent_width
=
level
*
INDENT_WIDTH
;
std
::
string
base_indent
=
fmt
::
format
(
"{:<{}}"
,
""
,
indent_width
);
std
::
string
indent_char
=
(
level
+
1
)
%
2
==
0
?
INNER_LIST_ELEM
:
OUTER_LIST_ELEM
;
return
base_indent
+
indent_char
+
" {}
\n
"
;
}
}
Loading