Ignore:
Timestamp:
09/09/23 15:12:57 (8 months ago)
Author:
Maciej Komosinski
Message:

Cosmetic

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/genetics/f4/f4_conv.cpp

    r1259 r1274  
    247247        {
    248248                const char* nclass = C->neuclass->name.c_str();
    249                 if (C->neuclass->getPreferredLocation() == 0)
     249                switch (C->neuclass->getPreferredLocation())
     250                {
     251                case NeuroClass::PrefLocation::PREFER_UNATTACHED:
    250252                {
    251253                        if (strcmp(nclass, "N") == 0) //special case just to specify the only neuron properties supported by f4, i.e., the properties for neuron class 'N'
     
    253255                        else
    254256                                sprintf(tmpLine, "d=\"%s\"", nclass);
    255                 }
    256                 else if (C->neuclass->getPreferredLocation() == 1) // attached to Part or have no required attachment - also part
     257                        break;
     258                }
     259                case NeuroClass::PrefLocation::PREFER_PART: // attach to Part
    257260                {
    258261                        int partno = C->dadlink->p2_refno;
     
    260263
    261264                        sprintf(tmpLine, "p=%d,d=\"%s\"", partno, nclass);
    262                 }
    263                 else // attached to Joint, assume there are only three possibilities of getPreferredLocation()
     265                        break;
     266                }
     267                case NeuroClass::PrefLocation::PREFER_JOINT: // attach to Joint
    264268                {
    265269                        int jointno = C->dadlink->joint_refno;
     
    273277                        else
    274278                                sprintf(tmpLine, "j=%d,d=\"%s\"", jointno, nclass);
     279                        break;
     280                }
    275281                }
    276282
Note: See TracChangeset for help on using the changeset viewer.