Commit f10e2458 authored by Mathieu Giraud's avatar Mathieu Giraud

core/tools.{h,cpp}: const

parent 86b13819
......@@ -26,10 +26,10 @@ map<string, string> seedMap = {
{"13s", "#######-######"}
};
string expand_seed(string seed)
string expand_seed(const string &seed)
{
if (seed.size() == 0)
seed = DEFAULT_SEED;
return expand_seed(DEFAULT_SEED);
if (seed.find(SEED_YES) == std::string::npos)
return seedMap[seed];
......@@ -86,7 +86,7 @@ string scientific_string_of_double(double number)
return ss.str();
}
string string_of_map(map <string, string> m, string before)
string string_of_map(map <string, string> m, const string &before)
{
stringstream ss;
for (auto x: m)
......
......@@ -50,7 +50,7 @@ using namespace std;
// Common seeds
#define DEFAULT_SEED "10s"
extern map<string, string> seedMap;
string expand_seed(string seed);
string expand_seed(const string &seed);
string seed_contiguous(int k);
......@@ -110,7 +110,7 @@ bool pair_occurrence_sort(pair<T, int> a, pair<T, int> b);
string string_of_int(int number);
string fixed_string_of_float(float number, int precision);
string scientific_string_of_double(double number);
string string_of_map(map <string, string> m, string before);
string string_of_map(map <string, string> m, const string &before);
/**
* @param nuc is A, C, G, T or any extended nucleotide (or lowercase)
......
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