]> git.sesse.net Git - vlc/commitdiff
open.cpp: unicode fix for ProbeDVD, ProbeCDDA, ProbeVCD
authorDamien Fouilleul <damienf@videolan.org>
Thu, 6 Oct 2005 16:00:42 +0000 (16:00 +0000)
committerDamien Fouilleul <damienf@videolan.org>
Thu, 6 Oct 2005 16:00:42 +0000 (16:00 +0000)
modules/gui/wxwidgets/open.cpp

index 3fcd51edc75246baad3999dd68e2ee7bea15cc26..09d10ffc02bf95b39f861f1c40aef77ac9af76bc 100644 (file)
@@ -1334,7 +1334,7 @@ static char * ProbeDVD(const wxChar *device)
 {
   char **ppsz_cd_drives;
   const wxWX2MBbuf tmp_buf = wxConvCurrent->cWX2MB(device);
-  char *psz_device = (char *) tmp_buf;
+  char *psz_device = const_cast<char *>(tmp_buf.data());
 
   if( IsDVD(psz_device) )
   {
@@ -1404,7 +1404,7 @@ static char * ProbeCDDA(const wxChar *device)
 {
    char *ppsz_device[2];
    const wxWX2MBbuf tmp_buf = wxConvCurrent->cWX2MB(device);
-   char *psz_device = (char *) tmp_buf;
+   char *psz_device = const_cast<char *>(tmp_buf.data());
    ppsz_device[0] = (device && *device) ? psz_device : NULL;
    ppsz_device[1] = NULL;
    return ProbeDevice(ppsz_device, CDIO_FS_AUDIO, false);
@@ -1417,7 +1417,7 @@ static char * ProbeVCD(const wxChar *device)
 {
    char *ppsz_device[2];
    const wxWX2MBbuf tmp_buf = wxConvCurrent->cWX2MB(device);
-   char *psz_device = (char *) tmp_buf;
+   char *psz_device = const_cast<char *>(tmp_buf.data());
    ppsz_device[0] = (device && *device) ? psz_device : NULL;
    ppsz_device[1] = NULL;
    return ProbeDevice(ppsz_device,