code cleanup
This commit is contained in:
parent
78e7dc772b
commit
372937e096
2 changed files with 4 additions and 3 deletions
|
@ -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) {
|
||||
|
|
|
@ -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
|
Loading…
Reference in a new issue