Silence some warnings
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,8 +60,8 @@ namespace OpenVulkano::AR
|
||||
|
||||
static bool DirHasMetadata(const std::filesystem::path& dirPath);
|
||||
|
||||
[[deprecated]] static ArSessionMetadata FromXML(const std::string& filePath);
|
||||
static ArSessionMetadata FromXML(const std::filesystem::path& filePath);
|
||||
|
||||
[[deprecated]] static ArSessionMetadata FromYaml(const std::string& filePath);
|
||||
static ArSessionMetadata FromYaml(const std::filesystem::path& filePath);
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user