mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Corrected poor code in API.
This commit is contained in:
+8
-4
@@ -328,7 +328,7 @@ BOSS_API unsigned int boss_eval_lists (boss_db db, const unsigned int language)
|
||||
std::list<boss::Plugin> temp = db->rawMetadata;
|
||||
try {
|
||||
db->game.RefreshActivePluginsList();
|
||||
for (std::list<boss::Plugin>::iterator it=temp.begin(); it != temp.end(); ++it) {
|
||||
for (std::list<boss::Plugin>::iterator it=temp.begin(); it != temp.end();) {
|
||||
it->EvalAllConditions(db->game, language);
|
||||
if (it->IsRegexPlugin()) {
|
||||
boost::regex regex;
|
||||
@@ -347,7 +347,9 @@ BOSS_API unsigned int boss_eval_lists (boss_db db, const unsigned int language)
|
||||
temp.push_back(p);
|
||||
}
|
||||
}
|
||||
temp.erase(it--);
|
||||
it = temp.erase(it);
|
||||
} else {
|
||||
++it;
|
||||
}
|
||||
}
|
||||
} catch (boss::error& e) {
|
||||
@@ -358,7 +360,7 @@ BOSS_API unsigned int boss_eval_lists (boss_db db, const unsigned int language)
|
||||
|
||||
temp = db->rawUserMetadata;
|
||||
try {
|
||||
for (std::list<boss::Plugin>::iterator it=temp.begin(); it != temp.end(); ++it) {
|
||||
for (std::list<boss::Plugin>::iterator it=temp.begin(); it != temp.end();) {
|
||||
it->EvalAllConditions(db->game, language);
|
||||
if (it->IsRegexPlugin()) {
|
||||
boost::regex regex;
|
||||
@@ -377,7 +379,9 @@ BOSS_API unsigned int boss_eval_lists (boss_db db, const unsigned int language)
|
||||
temp.push_back(p);
|
||||
}
|
||||
}
|
||||
temp.erase(it--);
|
||||
it = temp.erase(it);
|
||||
} else {
|
||||
++it;
|
||||
}
|
||||
}
|
||||
} catch (boss::error& e) {
|
||||
|
||||
Reference in New Issue
Block a user