mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2026-04-04 00:52:54 +02:00
Ran astyle to follow allman coding standard.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -81,7 +81,7 @@ bool MenuParser::GetMenuItems(CollectionInfo *collection)
|
||||
{
|
||||
import = importAttribute->value();
|
||||
}
|
||||
|
||||
|
||||
if(import != "true")
|
||||
{
|
||||
//todo, check for empty string
|
||||
|
||||
Reference in New Issue
Block a user