Author Topic: small patch for debugger  (Read 3795 times)

Offline frithjofh

  • Regular
  • ***
  • Posts: 376
small patch for debugger
« on: November 02, 2015, 07:56:38 pm »
just a small patch for the debugger. function should have const wxString& in signature, not const wxChar*
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: small patch for debugger
« Reply #1 on: November 03, 2015, 12:21:17 am »
Can you explain why? It seems to work just fine as it is.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline frithjofh

  • Regular
  • ***
  • Posts: 376
Re: small patch for debugger
« Reply #2 on: November 04, 2015, 10:58:41 am »
the const wxChar* variable is only used to immediately being passed to a base constructor as a const wxString&.

in all wxWidgets constructors the title variable of the constructor is a const wxString&, so why not in the derived class constructor?

also this constructor is only called once and then with a wxString argument (a member of the class) which is transformed into const wxChar* just to satisfy the type in the constructor. superfluous y really pointless.

(by the way, in my patch I din't adapt that call. should have...)

I found this while trying to compile c::b against wx3.0 STL, in wx normal mode this is not an error.

it is when using STL because there is no conversion from wxString to const wxChar* as there isn't any from std::string to const char* in c++11 neither.

but I do think it is not a big change, it doesn't affect more code and it makes the code locally better, more readable, more consistent, and robust for future changes in wxWidgets.
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: small patch for debugger
« Reply #3 on: November 04, 2015, 09:11:47 pm »
I found this while trying to compile c::b against wx3.0 STL, in wx normal mode this is not an error.

it is when using STL because there is no conversion from wxString to const wxChar* as there isn't any from std::string to const char* in c++11 neither.
Interesting, it builds fine with my wx3.1+stl build without this patch. Probably they've changes something in wx after 3.0.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline frithjofh

  • Regular
  • ***
  • Posts: 376
Re: small patch for debugger
« Reply #4 on: November 04, 2015, 09:13:22 pm »
well, I didn't know that...

so my only reason is consistency... not very much then...  ;)
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100