compilation fixes after string changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46986 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -128,7 +128,7 @@ void ScoreFile::ReadPlayersScore(
|
||||
|
||||
void ScoreFile::WritePlayersScore(const wxString& player, int wins, int games, int score)
|
||||
{
|
||||
if (player)
|
||||
if (!player.empty())
|
||||
{
|
||||
m_config->SetPath(_T("/General"));
|
||||
m_config->Write(_T("LastPlayer"), wxString(player)); // Without wxString tmp, thinks it's bool in VC++
|
||||
|
@@ -888,7 +888,7 @@ long MainWindow::DoSearch(void)
|
||||
|
||||
// Only match if we're looking at a different poem
|
||||
// (no point in displaying the same poem again)
|
||||
if ((ch == m_searchString[i]) && (last_poem_start != previous_poem_start))
|
||||
if ((m_searchString[i] == ch) && (last_poem_start != previous_poem_start))
|
||||
{
|
||||
if (i == 0)
|
||||
last_find = ftell(file);
|
||||
|
@@ -747,7 +747,7 @@ MyFrame::MyFrame(const wxString& title)
|
||||
m_logWin->SetEditable(false);
|
||||
wxLogTextCtrl* logger = new wxLogTextCtrl( m_logWin );
|
||||
m_logOld = logger->SetActiveTarget( logger );
|
||||
logger->SetTimestamp( NULL );
|
||||
logger->DisableTimestamp();
|
||||
|
||||
|
||||
topSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
@@ -125,7 +125,7 @@ static void bar(const wxChar *p)
|
||||
|
||||
void baz(const wxString& s)
|
||||
{
|
||||
printf("baz: %s\n", s.c_str());
|
||||
printf("baz: %s\n", (const char*)s.c_str());
|
||||
}
|
||||
|
||||
void foo(int n)
|
||||
|
@@ -833,7 +833,7 @@ void MyFrame::OnFileExec(wxCommandEvent& WXUNUSED(event))
|
||||
wxString filename;
|
||||
|
||||
#if wxUSE_FILEDLG
|
||||
filename = wxLoadFileSelector(_T("any file"), NULL, s_filename, this);
|
||||
filename = wxLoadFileSelector(_T("any file"), wxEmptyString, s_filename, this);
|
||||
#else // !wxUSE_FILEDLG
|
||||
filename = wxGetTextFromUser(_T("Enter the file name"), _T("exec sample"),
|
||||
s_filename, this);
|
||||
|
@@ -337,8 +337,8 @@ void MyFrame::OnExecute(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
wxString s = _T("Date");
|
||||
|
||||
m_client->GetConnection()->Execute((wxChar *)s.c_str());
|
||||
m_client->GetConnection()->Execute((wxChar *)s.c_str(), (s.Length() + 1) * sizeof(wxChar));
|
||||
m_client->GetConnection()->Execute((const wxChar *)s.c_str());
|
||||
m_client->GetConnection()->Execute((const wxChar *)s.c_str(), (s.Length() + 1) * sizeof(wxChar));
|
||||
#if wxUSE_DDE_FOR_IPC
|
||||
wxLogMessage(_T("DDE Execute can only be used to send text strings, not arbitrary data.\nThe type argument will be ignored, text truncated, converted to Unicode and null terminated."));
|
||||
#endif
|
||||
@@ -353,9 +353,9 @@ void MyFrame::OnPoke(wxCommandEvent& WXUNUSED(event))
|
||||
if (m_client->IsConnected())
|
||||
{
|
||||
wxString s = wxDateTime::Now().Format();
|
||||
m_client->GetConnection()->Poke(_T("Date"), (wxChar *)s.c_str());
|
||||
m_client->GetConnection()->Poke(_T("Date"), (const wxChar *)s.c_str());
|
||||
s = wxDateTime::Now().FormatTime() + _T(" ") + wxDateTime::Now().FormatDate();
|
||||
m_client->GetConnection()->Poke(_T("Date"), (wxChar *)s.c_str(), (s.Length() + 1) * sizeof(wxChar));
|
||||
m_client->GetConnection()->Poke(_T("Date"), (const wxChar *)s.c_str(), (s.Length() + 1) * sizeof(wxChar));
|
||||
char bytes[3];
|
||||
bytes[0] = '1'; bytes[1] = '2'; bytes[2] = '3';
|
||||
m_client->GetConnection()->Poke(_T("bytes[3]"), (wxChar *)bytes, 3, wxIPC_PRIVATE);
|
||||
|
@@ -358,7 +358,7 @@ MyFrame::MyFrame(const wxString& title)
|
||||
m_logWin->SetEditable(false);
|
||||
wxLogTextCtrl* logger = new wxLogTextCtrl( m_logWin );
|
||||
m_logOld = logger->SetActiveTarget( logger );
|
||||
logger->SetTimestamp( NULL );
|
||||
logger->DisableTimestamp();
|
||||
|
||||
wxBoxSizer *topSizer = new wxBoxSizer( wxVERTICAL );
|
||||
topSizer->Add( button1, 0, wxALL, 5 );
|
||||
|
@@ -246,17 +246,15 @@ CustomMacro::~CustomMacro()
|
||||
delete [] macroBody;
|
||||
}
|
||||
|
||||
void TexOutput(const wxChar *s, bool ordinaryText)
|
||||
void TexOutput(const wxString& s, bool ordinaryText)
|
||||
{
|
||||
int len = wxStrlen(s);
|
||||
|
||||
// Update current column, but only if we're guaranteed to
|
||||
// be ordinary text (not mark-up stuff)
|
||||
int i;
|
||||
if (ordinaryText)
|
||||
for (i = 0; i < len; i++)
|
||||
for (wxString::const_iterator i = s.begin(); i != s.end(); ++i)
|
||||
{
|
||||
if (s[i] == 13 || s[i] == 10)
|
||||
if (*i == 13 || *i == 10)
|
||||
currentColumn = 0;
|
||||
else
|
||||
currentColumn ++;
|
||||
|
@@ -162,7 +162,7 @@ extern FILE *CurrentOutput2;
|
||||
void AddMacroDef(int the_id, const wxChar *name, int n, bool ignore = false, bool forbidden = false);
|
||||
void TexInitialize(int bufSize);
|
||||
void TexCleanUp(void);
|
||||
void TexOutput(const wxChar *s, bool ordinaryText = false);
|
||||
void TexOutput(const wxString& s, bool ordinaryText = false);
|
||||
wxChar *GetArgData(TexChunk *chunk);
|
||||
wxChar *GetArgData(void); // Get the string for the current argument
|
||||
int GetNoArgs(void); // Get the number of arguments for the current macro
|
||||
|
Reference in New Issue
Block a user