Garux / netradiant-custom

The open-source, cross-platform level editor for id Tech based games.
https://garux.github.io/NRC/
Other
301 stars 53 forks source link

invalid conversion from ‘const char*’ in texwindow.cpp #21

Closed illwieckz closed 5 years ago

illwieckz commented 5 years ago

Introduced in 23d2497: https://github.com/Garux/netradiant-custom/blob/23d2497f12fe91a5eb0e14b71095cbb1c2ec80cb/radiant/texwindow.cpp#L1427-L1428

Those types are obviously not the sames.

It produces that compilation error:

/home/illwieckz/dev/netradiant/radiant/texwindow.cpp: In function ‘gboolean TextureBrowser_button_press(ui::Widget, GdkEventButton*, TextureBrowser*)’:
/home/illwieckz/dev/netradiant/radiant/texwindow.cpp:1532:22: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
   char* dir = strrchr( sh, '/' );
               ~~~~~~~^~~~~~~~~~~
/home/illwieckz/dev/netradiant/radiant/texwindow.cpp:1535:16: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
    dir = strchr( sh, '/' );
          ~~~~~~^~~~~~~~~~~
illwieckz commented 5 years ago

hmmm, looks like I compiled an old branch… I don't know if the issue is still there in another form or not… so I'm closing it at this time.

Garux commented 5 years ago

Yeah, this code is rather invalid (but working), have been fixed after that, a few times :b