Trivial code formatting for some {.cpp,.h} files
This commit is contained in:
@@ -91,12 +91,12 @@ void *Type::createInstance(void)
|
||||
void *Type::createInstanceByName(const char* TypeName, bool bLoadModule)
|
||||
{
|
||||
// if not already, load the module
|
||||
if(bLoadModule)
|
||||
if (bLoadModule)
|
||||
importModule(TypeName);
|
||||
|
||||
// now the type should be in the type map
|
||||
Type t = fromName(TypeName);
|
||||
if(t == badType())
|
||||
if (t == badType())
|
||||
return 0;
|
||||
|
||||
return t.createInstance();
|
||||
@@ -125,7 +125,7 @@ string Type::getModuleName(const char* ClassName)
|
||||
string temp(ClassName);
|
||||
std::string::size_type pos = temp.find_first_of("::");
|
||||
|
||||
if(pos != std::string::npos)
|
||||
if (pos != std::string::npos)
|
||||
return string(temp,0,pos);
|
||||
else
|
||||
return string();
|
||||
@@ -178,7 +178,7 @@ Type Type::fromName(const char *name)
|
||||
std::map<std::string,unsigned int>::const_iterator pos;
|
||||
|
||||
pos = typemap.find(name);
|
||||
if(pos != typemap.end())
|
||||
if (pos != typemap.end())
|
||||
return typedata[pos->second]->type;
|
||||
else
|
||||
return Type::badType();
|
||||
@@ -186,7 +186,7 @@ Type Type::fromName(const char *name)
|
||||
|
||||
Type Type::fromKey(unsigned int key)
|
||||
{
|
||||
if(key < typedata.size())
|
||||
if (key < typedata.size())
|
||||
return typedata[key]->type;
|
||||
else
|
||||
return Type::badType();
|
||||
@@ -207,7 +207,7 @@ bool Type::isDerivedFrom(const Type type) const
|
||||
|
||||
Type temp(*this);
|
||||
do {
|
||||
if(temp == type)
|
||||
if (temp == type)
|
||||
return true;
|
||||
temp = temp.getParent();
|
||||
} while (temp != badType());
|
||||
@@ -221,7 +221,7 @@ int Type::getAllDerivedFrom(const Type type, std::vector<Type> & List)
|
||||
|
||||
for(std::vector<TypeData*>::const_iterator it = typedata.begin();it!= typedata.end();++it)
|
||||
{
|
||||
if((*it)->type.isDerivedFrom(type))
|
||||
if ((*it)->type.isDerivedFrom(type))
|
||||
{
|
||||
List.push_back((*it)->type);
|
||||
cnt++;
|
||||
|
||||
Reference in New Issue
Block a user