[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re[2]: [lmi] compilation fixes for wx trunk
From: |
Vadim Zeitlin |
Subject: |
Re[2]: [lmi] compilation fixes for wx trunk |
Date: |
Sat, 1 Nov 2008 17:07:02 +0100 |
On Sat, 01 Nov 2008 15:59:18 +0000 Greg Chicares <address@hidden> wrote:
GC> > Index: icon_monger.cpp
GC> [...]
GC> > - std::string icon_name = id.c_str();
GC> > + std::string icon_name(id.c_str());
GC> >
GC> >
GC> > Without them, compilation against wx trunk fails. I believe the first
GC> > thing was already done before in other places.
GC>
GC> Why does 'std_string = wx_string.c_str()' fail?
c_str() has changed in the current wx svn trunk to return a proxy
wxCStrData object which is convertible to either char* or wchar_t* string
as part of the changes meant to allow programs not using Unicode in their
code to use the Unicode version of wxWidgets (LMI falls in this category
BTW). So the above needs 2 implicit conversions: first from wxCStrData to
"const char*" and then from "const char*" to std::string and hence won't be
done by the compiler. The replacement only needs one implicit conversion
and so fixes the problem.
Regards,
VZ