From 051ed3e7306925217278768f74269c1b12ae2968 Mon Sep 17 00:00:00 2001 From: Martin Brodbeck Date: Thu, 12 Jul 2018 14:38:22 +0200 Subject: [PATCH] refacturing --- src/core/database.cpp | 2 +- src/core/entity.cpp | 2 +- src/core/entity.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/database.cpp b/src/core/database.cpp index bec8d37..43c82c3 100644 --- a/src/core/database.cpp +++ b/src/core/database.cpp @@ -174,7 +174,7 @@ unsigned int Database::storeSellers(std::vector& sellers) sqlite3_bind_text(stmt, sqlite3_bind_parameter_index(stmt, ":last_name"), seller.getLastName().c_str(), -1, nullptr); sqlite3_bind_int(stmt, sqlite3_bind_parameter_index(stmt, ":num_offered_articles"), - seller.getNumberOfOfferedArticles()); + seller.numArticlesOffered()); retCode = sqlite3_step(stmt); diff --git a/src/core/entity.cpp b/src/core/entity.cpp index 6a6e5d8..08614df 100644 --- a/src/core/entity.cpp +++ b/src/core/entity.cpp @@ -13,7 +13,7 @@ void Entity::createUuid() uuid_ = generator(); } -void Entity::createUuidFromString(const std::string& uuidString) +void Entity::setUuidFromString(const std::string& uuidString) { boost::uuids::string_generator generator{}; uuid_ = generator(uuidString); diff --git a/src/core/entity.h b/src/core/entity.h index 8f1f63f..11890c6 100644 --- a/src/core/entity.h +++ b/src/core/entity.h @@ -14,7 +14,7 @@ class Entity virtual ~Entity() = 0; const boost::uuids::uuid& getUuid() const { return uuid_; }; void createUuid(); - void createUuidFromString(const std::string& uuidString); + void setUuidFromString(const std::string& uuidString); virtual State getState() const; void setState(State state) { state_ = state; }