Re: wxWidgets 2.9 build
От | Dave Page |
---|---|
Тема | Re: wxWidgets 2.9 build |
Дата | |
Msg-id | AANLkTiknuDTW69upN6nC=e=OUsMUvea=wpJz7u=kB30T@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: wxWidgets 2.9 build (Peter Geoghegan <peter.geoghegan86@gmail.com>) |
Список | pgadmin-hackers |
On Tue, Feb 1, 2011 at 12:26 AM, Peter Geoghegan <peter.geoghegan86@gmail.com> wrote: > On 31 January 2011 20:27, Dave Page <dpage@pgadmin.org> wrote: >> I tried it on VC++ and it didn't complain. Didn't test gcc though. > > Can you produce a test case? I wasn't aware that it is possible to use > the preprocessor to define C++ member function macros. I was suggesting to use it instead of the ugly cast, not to define a member function - eg. diff --git a/pgadmin/pgAdmin3.cpp b/pgadmin/pgAdmin3.cpp index 603c0fd..1b7105f 100644 --- a/pgadmin/pgAdmin3.cpp +++ b/pgadmin/pgAdmin3.cpp @@ -311,10 +311,11 @@ bool pgAdmin3::OnInit() // Setup logging InitLogger(); +#define cstr(x) ((const wxChar *)x) wxString msg; msg << wxT("# ") << appearanceFactory->GetLongAppName() << wxT(" Version ") << VERSION_STR << wxT(" Startup"); wxLogInfo(wxT("##############################################################")); - wxLogInfo(wxT("%s"), msg.c_str()); + wxLogInfo(wxT("%s"), cstr(msg)); wxLogInfo(wxT("##############################################################")); #ifdef SSL (which works fine on GCC too it seems). >> OK - please send the updated patch and I'll test it again. > > Will do. Thanks. -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
В списке pgadmin-hackers по дате отправления: