]> localhost Git - SCSI2SD-V6.git/commitdiff
Fix invalid implicit conversion from wxString to std::string
authorJonathan Wakely <github@kayari.org>
Thu, 18 Feb 2021 17:11:23 +0000 (17:11 +0000)
committerMichael McMaster <michael@codesrc.com>
Mon, 26 Apr 2021 10:59:30 +0000 (20:59 +1000)
This fails to compile because CreateTempFileName returns a wxString
which doesn't have an implicit conversion to std::string. One solution
would be to call ToStdString() to get a std::string, but this change
just uses auto to deduce the type.

src/scsi2sd-util6/scsi2sd-util.cc

index ddd10919b70a1b6758c7633c44f1eb1c3bed9e4c..60102fe98c56d7fe7e4c8cee2b4590cae1f8cd14 100644 (file)
@@ -562,7 +562,7 @@ private:
                }
 #endif
 
-               std::string tmpFile =
+               auto tmpFile =
                        wxFileName::CreateTempFileName(
                                _("SCSI2SD_MARKER"), static_cast<wxFile*>(NULL));
                wxRemoveFile(tmpFile); // dfu-util won't overwrite.