Ignore:
Timestamp:
04/09/15 23:51:28 (9 years ago)
Author:
Maciej Komosinski
Message:
  • explicit c_str() in SString instead of (const char*) cast
  • genetic converters and GenMan? are now thread-local which enables multi-threaded simulator separation
File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/_demos/loader_test_param.cpp

    r330 r348  
    8484                {
    8585                case MultiParamLoader::OnComment:
    86                         fprintf(stderr, "comment: '%s'\n", (const char*)loader.getComment());
     86                        fprintf(stderr, "comment: '%s'\n", loader.getComment().c_str());
    8787                        break;
    8888
     
    9292                        // In fact, this method is used not just for truly unknown objects but also for
    9393                        // dynamic objects that cannot be added using MultiParamLoader.addObject().
    94                         fprintf(stderr, "unknown object found: '%s' (will be skipped)\n", (const char*)loader.getObjectName());
     94                        fprintf(stderr, "unknown object found: '%s' (will be skipped)\n", loader.getObjectName().c_str());
    9595                        break;
    9696
     
    9898                        fprintf(stderr, "loaded:\n");
    9999                        for (int i = 0; i < param.getPropCount(); i++)
    100                                 fprintf(stderr, "%s=%s\n", param.id(i), (const char*)param.getText(i));
    101                         fprintf(stderr, "type of 'x1' is: %s\n", (const char*)data.x1.typeDescription());
    102                         fprintf(stderr, "type of 'x2' is: %s\n", (const char*)data.x2.typeDescription());
     100                                fprintf(stderr, "%s=%s\n", param.id(i), param.getText(i).c_str());
     101                        fprintf(stderr, "type of 'x1' is: %s\n", data.x1.typeDescription().c_str());
     102                        fprintf(stderr, "type of 'x2' is: %s\n", data.x2.typeDescription().c_str());
    103103                        fprintf(stderr, "-----\n\n");
    104104                        param.save(&virt_stdout);
     
    112112
    113113                case MultiParamLoader::OnError:
    114                         fprintf(stderr, "Error: %s", (const char*)loader.getError());
     114                        fprintf(stderr, "Error: %s", loader.getError().c_str());
    115115                }
    116116        }
Note: See TracChangeset for help on using the changeset viewer.