Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Variational Voxel 3D Detection
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
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
MaLeCi
OpenDR
Variational Voxel 3D Detection
Commits
fa1b2dac
Unverified
Commit
fa1b2dac
authored
2 years ago
by
Stefania Pedrazzi
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix cppcheck 2.9 errors (#311)
parent
d8b1572e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/c_api/face_recognition.cpp
+3
-3
3 additions, 3 deletions
src/c_api/face_recognition.cpp
with
3 additions
and
3 deletions
src/c_api/face_recognition.cpp
+
3
−
3
View file @
fa1b2dac
...
...
@@ -82,9 +82,9 @@ std::string json_get_key_string(std::string json, const std::string &key) {
std
::
size_t
start_idx
=
json
.
find
(
key
);
std
::
string
value
=
json
.
substr
(
start_idx
);
value
=
value
.
substr
(
value
.
find
(
":"
)
+
1
);
value
=
value
.
substr
(
0
,
value
.
find
(
","
));
value
.
resize
(
value
.
find
(
","
));
value
=
value
.
substr
(
value
.
find
(
"
\"
"
)
+
1
);
value
=
value
.
substr
(
0
,
value
.
find
(
"
\"
"
));
value
.
resize
(
value
.
find
(
"
\"
"
));
return
value
;
}
...
...
@@ -116,7 +116,7 @@ void load_face_recognition_model(const char *model_path, face_recognition_model_
std
::
string
basepath
=
model_json_path
.
substr
(
0
,
split_pos
);
split_pos
=
basepath
.
find_last_of
(
"/"
);
split_pos
=
split_pos
>
0
?
split_pos
+
1
:
0
;
basepath
=
basepath
.
substr
(
0
,
split_pos
);
basepath
.
resize
(
split_pos
);
// Parse JSON
std
::
string
onnx_model_path
=
basepath
+
json_get_key_string
(
str
,
"model_paths"
);
...
...
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