Commit 84b26644 authored by Mathieu Giraud's avatar Mathieu Giraud

core/labels.{h,cpp}, vidjil.cpp: transform load_map() into load_into_map(), taking a map as input

parent 13a66d7d
......@@ -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 ;
}
......@@ -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);
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment