Fix helper naming a bit

This commit is contained in:
2026-06-22 15:30:19 +03:00
parent 52b0d6642f
commit 5ae6fb711c
2 changed files with 12 additions and 12 deletions

View File

@@ -10,28 +10,28 @@ using std::istream;
using std::ostream;
using std::string;
bool read_config_json(json& cfg, const string& filename, ostream* log)
bool read_file_json(json& j, const string& filename, ostream* log)
{
ifstream cfg_file(filename);
ifstream file(filename);
if (!cfg_file.is_open())
if (!file.is_open())
{
if (nullptr != log)
{
*log << "Could not open config file" << endl;
*log << "Could not open file" << endl;
}
return false;
}
return read_config_json(cfg, cfg_file, log);
return read_stream_json(j, file, log);
}
bool read_config_json(json& cfg, istream& in, ostream* log)
bool read_stream_json(json& j, istream& in, ostream* log)
{
// Parse with comments
try
{
cfg = json::parse(in, nullptr, true, true);
j = json::parse(in, nullptr, true, true);
}
catch (const std::exception &e)
{