Ignore:
Timestamp:
07/09/20 00:13:20 (4 years ago)
Author:
Maciej Komosinski
Message:

Building a Model from Geno now fails when Model.shape is incompatible with Geno.format; renamed enum constants for genetic formats: xxx_FORMAT => FORMAT_xxx

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/genetics/genoconv.cpp

    r981 r988  
    107107        for (; gk = (GenoConverter*)converters(i); i++)
    108108        {
    109                 if ((in != Geno::UNKNOWN_FORMAT) && (in != gk->in_format)) continue;
    110                 if ((out != Geno::UNKNOWN_FORMAT) && (out != gk->out_format)) continue;
     109                if ((in != Geno::FORMAT_UNKNOWN) && (in != gk->in_format)) continue;
     110                if ((out != Geno::FORMAT_UNKNOWN) && (out != gk->out_format)) continue;
    111111                if ((enabled != -1) && (enabled != gk->enabled)) continue;
    112112                if ((name) && (strcmp(name, gk->name))) continue;
     
    168168        {
    169169                if (converter_missing) *converter_missing = false;
    170                 return Geno("", Geno::INVALID_FORMAT, "", "Invalid genotype cannot be converted");
     170                return Geno("", Geno::FORMAT_INVALID, "", "Invalid genotype cannot be converted");
    171171        }
    172172        int mapavail;
     
    176176        {
    177177                if (converter_missing) *converter_missing = true;
    178                 return Geno("", Geno::INVALID_FORMAT, "", "Converter not found");
     178                return Geno("", Geno::FORMAT_INVALID, "", "Converter not found");
    179179        }
    180180        if (converter_missing) *converter_missing = false;
     
    193193                {
    194194                        string t = ssprintf("f%s->f%s conversion failed (%s)", gk->in_format.c_str(), gk->out_format.c_str(), gk->name);
    195                         return Geno("", Geno::INVALID_FORMAT, "", t.c_str());
     195                        return Geno("", Geno::FORMAT_INVALID, "", t.c_str());
    196196                }
    197197                if (mapavail)
Note: See TracChangeset for help on using the changeset viewer.