Commit db5ebbc7 authored by Mathieu Giraud's avatar Mathieu Giraud

core/tools.{h,cpp}: expand_seed(), and redefine DEFAULT_SEED

See #3293.
parent 3dbb2099
......@@ -26,6 +26,18 @@ map<string, string> seedMap = {
{"13s", "#######-######"}
};
string expand_seed(string seed)
{
if (seed.size() == 0)
seed = DEFAULT_SEED;
if (seed.find(SEED_YES) == std::string::npos)
return seedMap[seed];
return seed ;
}
char spaced_buf[MAX_SEED_SIZE+1];
string spaced(const string &input, const string &seed) {
......
......@@ -48,7 +48,9 @@ using namespace std;
#define SEED_YES '#'
// Common seeds
#define DEFAULT_SEED "10s"
extern map<string, string> seedMap;
string expand_seed(string seed);
string seed_contiguous(int k);
......
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