diff --git a/lib/graphicsdev/GL.cpp b/lib/graphicsdev/GL.cpp index 57512f5..b81093d 100644 --- a/lib/graphicsdev/GL.cpp +++ b/lib/graphicsdev/GL.cpp @@ -1129,7 +1129,7 @@ struct GLCommandQueue : IGraphicsCommandQueue static void RenderingWorker(GLCommandQueue* self) { #if _WIN32 - std::string thrName = WCSTMBS(APP->getFriendlyName().c_str()) + " GL Rendering Thread"; + std::string thrName = WCSTMBS(APP->getFriendlyName().data()) + " GL Rendering Thread"; #else std::string thrName = std::string(APP->getFriendlyName()) + " GL Rendering Thread"; #endif diff --git a/lib/inputdev/HIDDeviceWinUSB.cpp b/lib/inputdev/HIDDeviceWinUSB.cpp index 828213a..913b153 100644 --- a/lib/inputdev/HIDDeviceWinUSB.cpp +++ b/lib/inputdev/HIDDeviceWinUSB.cpp @@ -75,7 +75,7 @@ class HIDDeviceWinUSB final : public IHIDDevice std::unique_lock lk(device->m_initMutex); /* POSIX.. who needs it?? -MS */ - device->m_devHandle = CreateFileA(device->m_devPath.c_str(), + device->m_devHandle = CreateFileA(device->m_devPath.data(), GENERIC_WRITE | GENERIC_READ, FILE_SHARE_WRITE | FILE_SHARE_READ, NULL, @@ -85,8 +85,8 @@ class HIDDeviceWinUSB final : public IHIDDevice if (INVALID_HANDLE_VALUE == device->m_devHandle) { _snprintf(errStr, 256, "Unable to open %s@%s: %d\n", - device->m_token.getProductName().c_str(), - device->m_devPath.c_str(), GetLastError()); + device->m_token.getProductName().data(), + device->m_devPath.data(), GetLastError()); device->m_devImp->deviceError(errStr); lk.unlock(); device->m_initCond.notify_one(); @@ -96,8 +96,8 @@ class HIDDeviceWinUSB final : public IHIDDevice if (!WinUsb_Initialize(device->m_devHandle, &device->m_usbHandle)) { _snprintf(errStr, 256, "Unable to open %s@%s: %d\n", - device->m_token.getProductName().c_str(), - device->m_devPath.c_str(), GetLastError()); + device->m_token.getProductName().data(), + device->m_devPath.data(), GetLastError()); device->m_devImp->deviceError(errStr); lk.unlock(); device->m_initCond.notify_one(); @@ -110,8 +110,8 @@ class HIDDeviceWinUSB final : public IHIDDevice if (!WinUsb_QueryInterfaceSettings(device->m_usbHandle, 0, &ifDesc)) { _snprintf(errStr, 256, "Unable to open %s@%s: %d\n", - device->m_token.getProductName().c_str(), - device->m_devPath.c_str(), GetLastError()); + device->m_token.getProductName().data(), + device->m_devPath.data(), GetLastError()); device->m_devImp->deviceError(errStr); lk.unlock(); device->m_initCond.notify_one(); @@ -177,7 +177,7 @@ class HIDDeviceWinUSB final : public IHIDDevice /* POSIX.. who needs it?? -MS */ device->m_overlapped.hEvent = CreateEvent(nullptr, TRUE, FALSE, nullptr); - device->m_hidHandle = CreateFileA(device->m_devPath.c_str(), + device->m_hidHandle = CreateFileA(device->m_devPath.data(), GENERIC_WRITE | GENERIC_READ, FILE_SHARE_WRITE | FILE_SHARE_READ, NULL, @@ -187,8 +187,8 @@ class HIDDeviceWinUSB final : public IHIDDevice if (INVALID_HANDLE_VALUE == device->m_hidHandle) { _snprintf(errStr, 256, "Unable to open %s@%s: %d\n", - device->m_token.getProductName().c_str(), - device->m_devPath.c_str(), GetLastError()); + device->m_token.getProductName().data(), + device->m_devPath.data(), GetLastError()); device->m_devImp->deviceError(errStr); lk.unlock(); device->m_initCond.notify_one(); @@ -198,8 +198,8 @@ class HIDDeviceWinUSB final : public IHIDDevice if (!HidD_GetPreparsedData(device->m_hidHandle, &device->m_preparsedData)) { _snprintf(errStr, 256, "Unable get preparsed data of %s@%s: %d\n", - device->m_token.getProductName().c_str(), - device->m_devPath.c_str(), GetLastError()); + device->m_token.getProductName().data(), + device->m_devPath.data(), GetLastError()); device->m_devImp->deviceError(errStr); lk.unlock(); device->m_initCond.notify_one(); diff --git a/lib/win/ApplicationWin32.cpp b/lib/win/ApplicationWin32.cpp index 532252a..778a55c 100644 --- a/lib/win/ApplicationWin32.cpp +++ b/lib/win/ApplicationWin32.cpp @@ -375,7 +375,7 @@ public: int clientReturn = 0; std::thread clientThread([&]() { - std::string thrName = WCSTMBS(getFriendlyName().c_str()) + " Client Thread"; + std::string thrName = WCSTMBS(getFriendlyName().data()) + " Client Thread"; logvisor::RegisterThreadName(thrName.c_str()); CoInitializeEx(nullptr, COINIT_MULTITHREADED | COINIT_DISABLE_OLE1DDE); clientReturn = m_callback.appMain(this); @@ -486,7 +486,7 @@ int ApplicationRun(IApplication::EPlatformType platform, const std::vector& args, bool singleInstance) { - std::string thrName = WCSTMBS(friendlyName.c_str()) + " Main Thread"; + std::string thrName = WCSTMBS(friendlyName.data()) + " Main Thread"; logvisor::RegisterThreadName(thrName.c_str()); if (APP) return 1; diff --git a/lib/win/WindowWin32.cpp b/lib/win/WindowWin32.cpp index 3aa98fc..d760499 100644 --- a/lib/win/WindowWin32.cpp +++ b/lib/win/WindowWin32.cpp @@ -972,7 +972,7 @@ public: WindowWin32(SystemStringView title, Boo3DAppContextWin32& b3dCtx, void* vulkanHandle, uint32_t sampleCount) { - m_hwnd = CreateWindowW(L"BooWindow", title.c_str(), WS_OVERLAPPEDWINDOW, + m_hwnd = CreateWindowW(L"BooWindow", title.data(), WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, NULL, NULL); HINSTANCE wndInstance = HINSTANCE(GetWindowLongPtr(m_hwnd, GWLP_HINSTANCE));