summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan Long <ryan.long@oarcorp.com>2021-09-29 13:39:56 -0400
committerJoel Sherrill <joel@rtems.org>2021-12-15 08:04:43 -0600
commit877d83b57e2e6983484f74970e26ae150f14c283 (patch)
tree27cf9c3dc4a5f583f7c89a046d3002bbbcc06909
parentObjdumpProcessor.cc: Fix formatting (diff)
downloadrtems-tools-877d83b57e2e6983484f74970e26ae150f14c283.tar.bz2
TargetFactory.cc: Fix formatting
-rw-r--r--tester/covoar/TargetFactory.cc20
1 files changed, 9 insertions, 11 deletions
diff --git a/tester/covoar/TargetFactory.cc b/tester/covoar/TargetFactory.cc
index fa72f05..0b6be52 100644
--- a/tester/covoar/TargetFactory.cc
+++ b/tester/covoar/TargetFactory.cc
@@ -39,9 +39,7 @@ namespace Target {
//! This is the string found in configuration to match.
std::string theTarget;
//! This is the static wrapper for the constructor.
- TargetBase *(*theCtor)(
- std::string
- );
+ TargetBase *(*theCtor)( std::string );
} FactoryEntry_t;
//!
@@ -60,27 +58,27 @@ namespace Target {
{ "powerpc", Target_powerpc_Constructor },
{ "sparc", Target_sparc_Constructor },
{ "riscv", Target_riscv_Constructor },
- { "TBD", NULL },
+ { "TBD", NULL }
};
- TargetBase* TargetFactory(
- std::string targetName
- )
+ TargetBase* TargetFactory( std::string targetName )
{
size_t i;
std::string cpu;
i = targetName.find( '-' );
- if ( i == targetName.npos )
+ if ( i == targetName.npos ) {
cpu = targetName;
- else
+ } else {
cpu = targetName.substr( 0, i );
+ }
// 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 ( FactoryTable[i].theTarget == cpu )
+ for ( i = 0 ; i < sizeof( FactoryTable ) / sizeof( FactoryEntry_t ); i++) {
+ if ( FactoryTable[i].theTarget == cpu ) {
return FactoryTable[i].theCtor( targetName );
+ }
}
std::ostringstream what;