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)
|
void ScoreFile::WritePlayersScore(const wxString& player, int wins, int games, int score)
|
||||||
{
|
{
|
||||||
if (player)
|
if (!player.empty())
|
||||||
{
|
{
|
||||||
m_config->SetPath(_T("/General"));
|
m_config->SetPath(_T("/General"));
|
||||||
m_config->Write(_T("LastPlayer"), wxString(player)); // Without wxString tmp, thinks it's bool in VC++
|
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
|
// Only match if we're looking at a different poem
|
||||||
// (no point in displaying the same poem again)
|
// (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)
|
if (i == 0)
|
||||||
last_find = ftell(file);
|
last_find = ftell(file);
|
||||||
|
@@ -747,7 +747,7 @@ MyFrame::MyFrame(const wxString& title)
|
|||||||
m_logWin->SetEditable(false);
|
m_logWin->SetEditable(false);
|
||||||
wxLogTextCtrl* logger = new wxLogTextCtrl( m_logWin );
|
wxLogTextCtrl* logger = new wxLogTextCtrl( m_logWin );
|
||||||
m_logOld = logger->SetActiveTarget( logger );
|
m_logOld = logger->SetActiveTarget( logger );
|
||||||
logger->SetTimestamp( NULL );
|
logger->DisableTimestamp();
|
||||||
|
|
||||||
|
|
||||||
topSizer = new wxBoxSizer( wxVERTICAL );
|
topSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
@@ -125,7 +125,7 @@ static void bar(const wxChar *p)
|
|||||||
|
|
||||||
void baz(const wxString& s)
|
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)
|
void foo(int n)
|
||||||
|
@@ -833,7 +833,7 @@ void MyFrame::OnFileExec(wxCommandEvent& WXUNUSED(event))
|
|||||||
wxString filename;
|
wxString filename;
|
||||||
|
|
||||||
#if wxUSE_FILEDLG
|
#if wxUSE_FILEDLG
|
||||||
filename = wxLoadFileSelector(_T("any file"), NULL, s_filename, this);
|
filename = wxLoadFileSelector(_T("any file"), wxEmptyString, s_filename, this);
|
||||||
#else // !wxUSE_FILEDLG
|
#else // !wxUSE_FILEDLG
|
||||||
filename = wxGetTextFromUser(_T("Enter the file name"), _T("exec sample"),
|
filename = wxGetTextFromUser(_T("Enter the file name"), _T("exec sample"),
|
||||||
s_filename, this);
|
s_filename, this);
|
||||||
|
@@ -337,8 +337,8 @@ void MyFrame::OnExecute(wxCommandEvent& WXUNUSED(event))
|
|||||||
{
|
{
|
||||||
wxString s = _T("Date");
|
wxString s = _T("Date");
|
||||||
|
|
||||||
m_client->GetConnection()->Execute((wxChar *)s.c_str());
|
m_client->GetConnection()->Execute((const 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(), (s.Length() + 1) * sizeof(wxChar));
|
||||||
#if wxUSE_DDE_FOR_IPC
|
#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."));
|
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
|
#endif
|
||||||
@@ -353,9 +353,9 @@ void MyFrame::OnPoke(wxCommandEvent& WXUNUSED(event))
|
|||||||
if (m_client->IsConnected())
|
if (m_client->IsConnected())
|
||||||
{
|
{
|
||||||
wxString s = wxDateTime::Now().Format();
|
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();
|
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];
|
char bytes[3];
|
||||||
bytes[0] = '1'; bytes[1] = '2'; bytes[2] = '3';
|
bytes[0] = '1'; bytes[1] = '2'; bytes[2] = '3';
|
||||||
m_client->GetConnection()->Poke(_T("bytes[3]"), (wxChar *)bytes, 3, wxIPC_PRIVATE);
|
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);
|
m_logWin->SetEditable(false);
|
||||||
wxLogTextCtrl* logger = new wxLogTextCtrl( m_logWin );
|
wxLogTextCtrl* logger = new wxLogTextCtrl( m_logWin );
|
||||||
m_logOld = logger->SetActiveTarget( logger );
|
m_logOld = logger->SetActiveTarget( logger );
|
||||||
logger->SetTimestamp( NULL );
|
logger->DisableTimestamp();
|
||||||
|
|
||||||
wxBoxSizer *topSizer = new wxBoxSizer( wxVERTICAL );
|
wxBoxSizer *topSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
topSizer->Add( button1, 0, wxALL, 5 );
|
topSizer->Add( button1, 0, wxALL, 5 );
|
||||||
|
@@ -246,17 +246,15 @@ CustomMacro::~CustomMacro()
|
|||||||
delete [] macroBody;
|
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
|
// Update current column, but only if we're guaranteed to
|
||||||
// be ordinary text (not mark-up stuff)
|
// be ordinary text (not mark-up stuff)
|
||||||
int i;
|
int i;
|
||||||
if (ordinaryText)
|
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;
|
currentColumn = 0;
|
||||||
else
|
else
|
||||||
currentColumn ++;
|
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 AddMacroDef(int the_id, const wxChar *name, int n, bool ignore = false, bool forbidden = false);
|
||||||
void TexInitialize(int bufSize);
|
void TexInitialize(int bufSize);
|
||||||
void TexCleanUp(void);
|
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(TexChunk *chunk);
|
||||||
wxChar *GetArgData(void); // Get the string for the current argument
|
wxChar *GetArgData(void); // Get the string for the current argument
|
||||||
int GetNoArgs(void); // Get the number of arguments for the current macro
|
int GetNoArgs(void); // Get the number of arguments for the current macro
|
||||||
|
Reference in New Issue
Block a user