diff options
author | Ryan Long <ryan.long@oarcorp.com> | 2021-09-29 13:24:30 -0400 |
---|---|---|
committer | Joel Sherrill <joel@rtems.org> | 2021-12-10 11:05:16 -0600 |
commit | fa95ae2dadc5d5b44e40b7888b9ce3360c3ff401 (patch) | |
tree | c36c7de1da22e998892127427bdd05c3a66c643f /tester/covoar | |
parent | TraceList.cc: Convert from C to C++ (diff) | |
download | rtems-tools-fa95ae2dadc5d5b44e40b7888b9ce3360c3ff401.tar.bz2 |
TargetFactory.cc: Convert to C++
Diffstat (limited to 'tester/covoar')
-rw-r--r-- | tester/covoar/TargetFactory.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tester/covoar/TargetFactory.cc b/tester/covoar/TargetFactory.cc index 57ba686..fa72f05 100644 --- a/tester/covoar/TargetFactory.cc +++ b/tester/covoar/TargetFactory.cc @@ -37,7 +37,7 @@ namespace Target { //! typedef struct { //! This is the string found in configuration to match. - const char *theTarget; + std::string theTarget; //! This is the static wrapper for the constructor. TargetBase *(*theCtor)( std::string @@ -76,10 +76,10 @@ namespace Target { else cpu = targetName.substr( 0, i ); - // fprintf( stderr, "%s --> %s\n", targetName.c_str(), cpu.c_str()); + // std::cerr << targetName << " --> " << cpu << std::endl; // Iterate over the table trying to find an entry with a matching name for ( i=0 ; i < sizeof(FactoryTable) / sizeof(FactoryEntry_t); i++ ) { - if ( !strcmp(FactoryTable[i].theTarget, cpu.c_str() ) ) + if ( FactoryTable[i].theTarget == cpu ) return FactoryTable[i].theCtor( targetName ); } |