MSVC 16.8 Preview 3.1 compiler fix

The latest MSVC 16.8 Preview 3.1 cl.exe no longer likes the implicit conversion from false->std::shared_ptr
But it's happy with nullptr

Not the ideal solution, but it will kick the can down the road a little.
This commit is contained in:
Bevan Weiss 2020-09-23 19:19:29 +10:00 committed by Megamouse
parent 0c3c34179e
commit 04deb97f94
1 changed files with 2 additions and 2 deletions

View File

@ -474,11 +474,11 @@ bool mm_joystick_handler::GetMMJOYDevice(int index, MMJOYDevice* dev)
std::shared_ptr<PadDevice> mm_joystick_handler::get_device(const std::string& device) std::shared_ptr<PadDevice> mm_joystick_handler::get_device(const std::string& device)
{ {
if (!Init()) if (!Init())
return false; return nullptr;
int id = GetIDByName(device); int id = GetIDByName(device);
if (id < 0) if (id < 0)
return false; return nullptr;
std::shared_ptr<MMJOYDevice> joy_device = std::make_shared<MMJOYDevice>(m_devices.at(id)); std::shared_ptr<MMJOYDevice> joy_device = std::make_shared<MMJOYDevice>(m_devices.at(id));
return joy_device; return joy_device;