code cleanup

allow_new_sellers
Martin Brodbeck 4 years ago
parent 78e7dc772b
commit 372937e096
  1. 5
      src/core/database.cpp
  2. 2
      src/core/database.h

@ -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…
Cancel
Save