Silence some warnings

This commit is contained in:
Georg Hagen
2025-03-02 22:41:14 +01:00
parent d33ccd140c
commit efcee95158
5 changed files with 39 additions and 7 deletions

View File

@@ -10,6 +10,7 @@
#include <pugixml.hpp>
#include <fmt/format.h>
#include <filesystem>
#include <fstream>
namespace OpenVulkano::AR
{
@@ -21,7 +22,7 @@ namespace OpenVulkano::AR
: ArSessionMetadata(type, format, confRange, resolution, frameRate, SystemInfo::GetDeviceModelName(), SystemInfo::GetOsNameHumanReadable())
{}
ArSessionMetadata ArSessionMetadata::FromXML(const std::string& filePath)
ArSessionMetadata ArSessionMetadata::FromXML(const std::filesystem::path& filePath)
{
pugi::xml_document doc;
pugi::xml_parse_result result = doc.load_file(filePath.c_str());
@@ -49,9 +50,10 @@ namespace OpenVulkano::AR
};
}
ArSessionMetadata ArSessionMetadata::FromYaml(const std::string& filePath)
ArSessionMetadata ArSessionMetadata::FromYaml(const std::filesystem::path& filePath)
{
YAML::Node meta = YAML::LoadFile(filePath);
std::ifstream fin(filePath);
YAML::Node meta = YAML::Load(fin);
ArSessionMetadata metadata = {
ArType::GetFromName(meta["Type"].Scalar()),
@@ -150,4 +152,4 @@ Version: {}
type.GetName(), depthFormat.GetName(), static_cast<int>(confidenceRange.min), static_cast<int>(confidenceRange.max),
imageResolution.x, imageResolution.y, frameRate, device, os, version, FinishedRecordingInfoToYaml());
}
}
}