From fde7d98ecdb04b84483288bdc269045eb51193fc Mon Sep 17 00:00:00 2001 From: Ove Kaaven Date: Tue, 13 Apr 1999 16:22:43 +0000 Subject: [PATCH] Got some compiler warnings in non-Unicode build. Fixed them. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2146 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/ftp.cpp | 2 +- src/common/http.cpp | 4 ++-- src/common/wxexpr.cpp | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/common/ftp.cpp b/src/common/ftp.cpp index 9ef749df6f..5e8ce27493 100644 --- a/src/common/ftp.cpp +++ b/src/common/ftp.cpp @@ -155,7 +155,7 @@ bool wxFTP::SendCommand(const wxString& command, char exp_ret) return FALSE; } tmp_str = command + _T("\r\n"); - wxWX2MBbuf tmp_buf = tmp_str.mb_str(); + const wxWX2MBbuf tmp_buf = tmp_str.mb_str(); if (Write(MBSTRINGCAST tmp_buf, strlen(tmp_buf)).Error()) { m_lastError = wxPROTO_NETERR; return FALSE; diff --git a/src/common/http.cpp b/src/common/http.cpp index bfcd1ad156..a50e3ea140 100644 --- a/src/common/http.cpp +++ b/src/common/http.cpp @@ -106,7 +106,7 @@ void wxHTTP::SendHeaders() wxString buf; buf.Printf(_T("%s: %s\n\r"), head->GetKeyString(), str->GetData()); - wxWX2MBbuf cbuf = buf.mb_str(); + const wxWX2MBbuf cbuf = buf.mb_str(); Write(cbuf, strlen(cbuf)); head = head->Next(); @@ -187,7 +187,7 @@ bool wxHTTP::BuildRequest(const wxString& path, wxHTTP_Req req) { char *tmp_buf; char buf[HTTP_BSIZE]; - wxWX2MBbuf pathbuf = path.mb_str(); + const wxWX2MBbuf pathbuf = path.mb_str(); switch (req) { case wxHTTP_GET: diff --git a/src/common/wxexpr.cpp b/src/common/wxexpr.cpp index 0b5a9caa49..1d82a95ba1 100644 --- a/src/common/wxexpr.cpp +++ b/src/common/wxexpr.cpp @@ -733,7 +733,7 @@ void wxExpr::WriteExpr(ostream& stream) // Write as any other subexpression { stream << "\""; int i; - wxWX2MBbuf val = wxConv_libc.cWX2MB(value.string); + const wxWX2MBbuf val = wxConv_libc.cWX2MB(value.string); int len = strlen(val); for (i = 0; i < len; i++) { @@ -749,7 +749,7 @@ void wxExpr::WriteExpr(ostream& stream) // Write as any other subexpression case wxExprWord: { bool quote_it = FALSE; - wxWX2MBbuf val = wxConv_libc.cWX2MB(value.word); + const wxWX2MBbuf val = wxConv_libc.cWX2MB(value.word); int len = strlen(val); if ((len == 0) || (len > 0 && (val[0] > 64 && val[0] < 91))) quote_it = TRUE; @@ -1070,7 +1070,7 @@ bool wxExprDatabase::ReadFromString(const wxString& buffer) noErrors = 0; thewxExprDatabase = this; - wxWX2MBbuf buf = buffer.mb_str(); + const wxWX2MBbuf buf = buffer.mb_str(); LexFromString(MBSTRINGCAST buf); yyparse(); wxExprCleanUp(); @@ -1195,7 +1195,7 @@ char *wxmake_string(char *str) { wxChar *s, *t; int len, i; - wxMB2WXbuf sbuf = wxConv_libc.cMB2WX(str); + const wxMB2WXbuf sbuf = wxConv_libc.cMB2WX(str); str++; /* skip leading quote */ len = wxStrlen(sbuf) - 1; /* ignore trailing quote */ -- 2.45.2