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 authored and Megamouse committed 2020-09-23 12:44:32 +02:00
1 parent 0c3c34179e
commit 04deb97f94
1 file changed
+2 -2
+2 -2
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)
{
if (!Init())
return false;
return nullptr;
int id = GetIDByName(device);
if (id < 0)
return false;
return nullptr;
std::shared_ptr<MMJOYDevice> joy_device = std::make_shared<MMJOYDevice>(m_devices.at(id));
return joy_device;