Ran astyle to follow allman coding standard.

This commit is contained in:
Don Honerbrink
2015-02-17 08:41:07 -06:00
parent 6c4dfcb9af
commit 86200ad731
20 changed files with 275 additions and 167 deletions

View File

@@ -35,7 +35,7 @@ CollectionInfo::CollectionInfo(std::string name,
CollectionInfo::~CollectionInfo()
{
std::vector<Item *>::iterator it = Items.begin();
while(it != Items.end())
{
delete *it;
@@ -89,14 +89,14 @@ std::vector<Item *> *CollectionInfo::GetItems()
return &Items;
}
bool CollectionInfo::ItemIsLess(Item const *lhs, Item const *rhs)
bool CollectionInfo::ItemIsLess(Item const *lhs, Item const *rhs)
{
return lhs->GetLCTitle() < rhs->GetLCTitle();
}
void CollectionInfo::SortItems()
{
std::sort(Items.begin(), Items.end(), ItemIsLess);
std::sort(Items.begin(), Items.end(), ItemIsLess);
}

View File

@@ -36,7 +36,7 @@ public:
void GetExtensions(std::vector<std::string> &extensions);
private:
static bool ItemIsLess(Item const *lhs, Item const *rhs);
static bool ItemIsLess(Item const *lhs, Item const *rhs);
std::string Name;
std::string ListPath;

View File

@@ -84,7 +84,10 @@ bool CollectionInfoBuilder::ImportBasicList(CollectionInfo *info, std::string fi
{
std::ifstream includeStream(file.c_str());
if (!includeStream.good()) { return false; }
if (!includeStream.good())
{
return false;
}
std::string line;
@@ -121,14 +124,14 @@ bool CollectionInfoBuilder::ImportDirectory(CollectionInfo *info)
ImportBasicList(info, includeFile, includeFilter);
ImportBasicList(info, excludeFile, excludeFilter);
std::vector<std::string> extensions;
std::vector<std::string>::iterator extensionsIt;
info->GetExtensions(extensions);
(void)Conf.GetProperty("collections." + info->GetName() + ".launcher", launcher);
Logger::Write(Logger::ZONE_ERROR, "CollectionInfoBuilder", "Check path " + includeFile);
Logger::Write(Logger::ZONE_ERROR, "CollectionInfoBuilder", "Check path " + includeFile);
dp = opendir(path.c_str());
@@ -137,7 +140,7 @@ bool CollectionInfoBuilder::ImportDirectory(CollectionInfo *info)
Logger::Write(Logger::ZONE_ERROR, "CollectionInfoBuilder", "Could not read directory \"" + path + "\"");
return false;
}
while((dirp = readdir(dp)) != NULL)
{
std::string file = dirp->d_name;

View File

@@ -81,7 +81,7 @@ bool MenuParser::GetMenuItems(CollectionInfo *collection)
{
import = importAttribute->value();
}
if(import != "true")
{
//todo, check for empty string