pass 0, not NULL, to SendMsg() which takes long to avoid gcc warnings

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45341 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-04-08 22:42:45 +00:00
parent 2cdb6fdb13
commit 600b3983e9
2 changed files with 5 additions and 4 deletions

View File

@@ -533,7 +533,7 @@ methodOverrideMap = {
'wxString %s(const wxString& key);', 'wxString %s(const wxString& key);',
'''wxString %s(const wxString& key) { '''wxString %s(const wxString& key) {
int len = SendMsg(SCI_GETPROPERTY, (long)(const char*)wx2stc(key), (long)NULL); int len = SendMsg(SCI_GETPROPERTY, (long)(const char*)wx2stc(key), 0);
if (!len) return wxEmptyString; if (!len) return wxEmptyString;
wxMemoryBuffer mbuf(len+1); wxMemoryBuffer mbuf(len+1);
@@ -549,7 +549,7 @@ methodOverrideMap = {
'wxString %s(const wxString& key);', 'wxString %s(const wxString& key);',
'''wxString %s(const wxString& key) { '''wxString %s(const wxString& key) {
int len = SendMsg(SCI_GETPROPERTYEXPANDED, (long)(const char*)wx2stc(key), (long)NULL); int len = SendMsg(SCI_GETPROPERTYEXPANDED, (long)(const char*)wx2stc(key), 0);
if (!len) return wxEmptyString; if (!len) return wxEmptyString;
wxMemoryBuffer mbuf(len+1); wxMemoryBuffer mbuf(len+1);

View File

@@ -28,6 +28,7 @@
#include <ctype.h> #include <ctype.h>
#include "wx/wx.h"
#include "wx/tokenzr.h" #include "wx/tokenzr.h"
#include "wx/mstream.h" #include "wx/mstream.h"
#include "wx/image.h" #include "wx/image.h"
@@ -2561,7 +2562,7 @@ void wxStyledTextCtrl::SetLexerLanguage(const wxString& language) {
// Retrieve a 'property' value previously set with SetProperty. // Retrieve a 'property' value previously set with SetProperty.
wxString wxStyledTextCtrl::GetProperty(const wxString& key) { wxString wxStyledTextCtrl::GetProperty(const wxString& key) {
int len = SendMsg(SCI_GETPROPERTY, (long)(const char*)wx2stc(key), (long)NULL); int len = SendMsg(SCI_GETPROPERTY, (long)(const char*)wx2stc(key), 0);
if (!len) return wxEmptyString; if (!len) return wxEmptyString;
wxMemoryBuffer mbuf(len+1); wxMemoryBuffer mbuf(len+1);
@@ -2575,7 +2576,7 @@ wxString wxStyledTextCtrl::GetProperty(const wxString& key) {
// Retrieve a 'property' value previously set with SetProperty, // Retrieve a 'property' value previously set with SetProperty,
// with '$()' variable replacement on returned buffer. // with '$()' variable replacement on returned buffer.
wxString wxStyledTextCtrl::GetPropertyExpanded(const wxString& key) { wxString wxStyledTextCtrl::GetPropertyExpanded(const wxString& key) {
int len = SendMsg(SCI_GETPROPERTYEXPANDED, (long)(const char*)wx2stc(key), (long)NULL); int len = SendMsg(SCI_GETPROPERTYEXPANDED, (long)(const char*)wx2stc(key), 0);
if (!len) return wxEmptyString; if (!len) return wxEmptyString;
wxMemoryBuffer mbuf(len+1); wxMemoryBuffer mbuf(len+1);