build: use path objects over c_str calls
This commit is contained in:
parent
a93dd90da9
commit
9a6a406fa2
@ -533,7 +533,7 @@ void
|
|||||||
json::schema::validate (json::tree::node &data,
|
json::schema::validate (json::tree::node &data,
|
||||||
const std::experimental::filesystem::path &schema_path)
|
const std::experimental::filesystem::path &schema_path)
|
||||||
{
|
{
|
||||||
const util::mapped_file schema_data (schema_path.string ().c_str ());
|
const util::mapped_file schema_data (schema_path);
|
||||||
auto schema_object = json::tree::parse (schema_data.as_view<char> ());
|
auto schema_object = json::tree::parse (schema_data.as_view<char> ());
|
||||||
validate (data, schema_object->as_object ());
|
validate (data, schema_object->as_object ());
|
||||||
}
|
}
|
||||||
|
@ -241,7 +241,7 @@ MAP(
|
|||||||
std::unique_ptr<json::tree::node>
|
std::unique_ptr<json::tree::node>
|
||||||
json::tree::parse (const std::experimental::filesystem::path &src)
|
json::tree::parse (const std::experimental::filesystem::path &src)
|
||||||
{
|
{
|
||||||
const util::mapped_file data (src.string ().c_str ());
|
const util::mapped_file data (src);
|
||||||
return parse (data.as_view<char> ());
|
return parse (data.as_view<char> ());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ using util::detail::win32::library;
|
|||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
library::library (const std::experimental::filesystem::path &path)
|
library::library (const std::experimental::filesystem::path &path):
|
||||||
m_handle (LoadLibraryA (path.c_str ()))
|
m_handle (LoadLibraryA (path.c_str ()))
|
||||||
{
|
{
|
||||||
if (!m_handle)
|
if (!m_handle)
|
||||||
|
@ -25,7 +25,7 @@ namespace util {
|
|||||||
namespace detail { namespace win32 {
|
namespace detail { namespace win32 {
|
||||||
class library {
|
class library {
|
||||||
public:
|
public:
|
||||||
library (const std::experimenal::filesystem::path&);
|
library (const std::experimental::filesystem::path&);
|
||||||
~library ();
|
~library ();
|
||||||
|
|
||||||
void* symbol (const char *name);
|
void* symbol (const char *name);
|
||||||
|
Loading…
Reference in New Issue
Block a user