Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
84b26644
Commit
84b26644
authored
Apr 27, 2015
by
Mathieu Giraud
Browse files
core/labels.{h,cpp}, vidjil.cpp: transform load_map() into load_into_map(), taking a map as input
parent
13a66d7d
Changes
3
Show whitespace changes
Inline
Side-by-side
algo/core/labels.cpp
View file @
84b26644
...
...
@@ -5,13 +5,12 @@
#include "tools.h"
map
<
string
,
string
>
load
_map
(
string
map_file
)
void
load_into_map
(
map
<
string
,
string
>
&
the
_map
,
string
map_file
)
{
// Loads a simple file with key, values into a map
map
<
string
,
string
>
the_map
;
if
(
!
map_file
.
size
())
return
the_map
;
return
;
cout
<<
" <== "
<<
map_file
;
...
...
@@ -20,7 +19,6 @@ map <string, string> load_map(string map_file)
if
(
!
f
.
is_open
())
{
cout
<<
" [failed] "
<<
endl
;
return
the_map
;
}
int
nb_keys
=
0
;
...
...
@@ -42,8 +40,6 @@ map <string, string> load_map(string map_file)
}
cout
<<
": "
<<
nb_keys
<<
" elements"
<<
endl
;
return
the_map
;
}
algo/core/labels.h
View file @
84b26644
...
...
@@ -6,5 +6,5 @@
#include <list>
#include "fasta.h"
map
<
string
,
string
>
load
_map
(
string
map_file
);
void
load_into_map
(
map
<
string
,
string
>
&
the
_map
,
string
map_file
);
algo/vidjil.cpp
View file @
84b26644
...
...
@@ -331,6 +331,7 @@ int main (int argc, char **argv)
string
forced_edges
=
""
;
map
<
string
,
string
>
windows_labels
;
string
windows_labels_file
=
""
;
bool
only_labeled_windows
=
false
;
...
...
@@ -673,7 +674,7 @@ int main (int argc, char **argv)
out_dir
+=
"/"
;
/// Load labels ;
map
<
string
,
string
>
windows_labels
=
load_map
(
windows_labels_file
);
load_into_map
(
windows_labels
,
windows_labels_file
);
switch
(
command
)
{
case
CMD_WINDOWS
:
cout
<<
"Extracting windows"
<<
endl
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment