init: Place additional constraints on pathDebug

This commit is contained in:
Jack Grigg 2020-08-06 00:31:31 +01:00
parent 92f18661d8
commit 58c410974d
1 changed files with 3 additions and 1 deletions

View File

@ -812,7 +812,9 @@ void InitLogging()
pTracingHandle = tracing_init(nullptr, 0, initialFilter.c_str(), fLogTimestamps);
} else {
boost::filesystem::path pathDebug = GetDebugLogPath();
auto pathDebugStr = pathDebug.native();
const boost::filesystem::path::string_type& pathDebugStr = pathDebug.native();
static_assert(sizeof(boost::filesystem::path::value_type) == sizeof(codeunit),
"native path has unexpected code unit size");
pTracingHandle = tracing_init(
reinterpret_cast<const codeunit*>(pathDebugStr.c_str()),
pathDebugStr.length(),