Additional placefile view/add enhancements

This commit is contained in:
Dan Paulat 2023-07-23 23:24:45 -05:00
parent 0064733679
commit 18c05b3a63
6 changed files with 119 additions and 22 deletions

View file

@ -110,16 +110,13 @@ std::shared_ptr<Placefile> Placefile::Load(const std::string& filename)
{
logger_->debug("Loading placefile: {}", filename);
std::ifstream f(filename, std::ios_base::in);
return Load(filename, f);
return Load(f);
}
std::shared_ptr<Placefile> Placefile::Load(const std::string& name,
std::istream& is)
std::shared_ptr<Placefile> Placefile::Load(std::istream& is)
{
std::shared_ptr<Placefile> placefile = std::make_shared<Placefile>();
placefile->p->title_ = name;
std::string line;
while (scwx::util::getline(is, line))
{