code cleanup

This commit is contained in:
Martin Brodbeck 2018-07-13 14:05:22 +02:00
parent 78e7dc772b
commit 372937e096
2 changed files with 4 additions and 3 deletions

View file

@ -248,7 +248,7 @@ unsigned int Database::storeSellers(std::vector<std::shared_ptr<Seller>>& seller
}
if (seller->getState() != Seller::State::DELETE) {
count += storeArticles(stmt, seller->getArticles(false));
count += storeArticles(seller->getArticles(false));
}
}
@ -267,10 +267,11 @@ unsigned int Database::storeSellers(std::vector<std::shared_ptr<Seller>>& seller
return count;
}
unsigned int Database::storeArticles(sqlite3_stmt* stmt, std::vector<Article*> articles)
unsigned int Database::storeArticles(std::vector<Article*> articles)
{
int retCode{};
int count{};
sqlite3_stmt* stmt;
for (auto& article : articles) {
if (article->getState() == Article::State::NEW) {

View file

@ -25,7 +25,7 @@ class Database
void endTransaction();
void createNew();
int getVersion();
unsigned int storeArticles(sqlite3_stmt* stmt, std::vector<Article*> articles);
unsigned int storeArticles(std::vector<Article*> articles);
};
#endif // DATABASE_H