use path to open json file (sales)
This commit is contained in:
parent
7d98033c4a
commit
7227cdc8a3
2 changed files with 3 additions and 3 deletions
|
@ -106,10 +106,10 @@ void JsonUtil::exportSales(const std::string& filename, Marketplace* market, int
|
|||
writer->write(root, &file);
|
||||
}
|
||||
|
||||
void JsonUtil::importSales(const std::string& filename, Marketplace* market, int cashPointNo)
|
||||
void JsonUtil::importSales(const std::filesystem::path& filePath, Marketplace* market, int cashPointNo)
|
||||
{
|
||||
Json::Value jsonValues;
|
||||
std::ifstream file(filename);
|
||||
std::ifstream file(filePath);
|
||||
file >> jsonValues;
|
||||
|
||||
int source_no = jsonValues["source_no"].asInt();
|
||||
|
|
|
@ -12,7 +12,7 @@ class JsonUtil
|
|||
static void exportSellers(const std::string& filename, Marketplace* market);
|
||||
static void importSellers(const std::filesystem::path& filePath, Marketplace* market);
|
||||
static void exportSales(const std::string& filename, Marketplace* market, int cashPointNo);
|
||||
static void importSales(const std::string& filename, Marketplace* market, int cashPointNo);
|
||||
static void importSales(const std::filesystem::path& filePath, Marketplace* market, int cashPointNo);
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Reference in a new issue