]> git.saurik.com Git - wxWidgets.git/commitdiff
Couple of unicode fixes (the #if should be wxUSE_UNICODE, not wxUNICODE,
authorOve Kaaven <ovek@arcticnet.no>
Fri, 23 Jul 1999 09:41:17 +0000 (09:41 +0000)
committerOve Kaaven <ovek@arcticnet.no>
Fri, 23 Jul 1999 09:41:17 +0000 (09:41 +0000)
and there's no sense in allocating a wxWX2MBbuf of len 200 then assigning
a different buffer to it either)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3095 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/fs_inet.cpp
src/common/http.cpp

index 37453002084b5aa4095c7c6e12af5c6fe1ed7b23..7c0b89d38a45105cf3136b1b8b47513f3a752c77 100644 (file)
@@ -86,9 +86,9 @@ wxFSFile* wxInternetFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs), const wxStri
         if (content == wxEmptyString) content = GetMimeTypeFromExt(location);
         if (s) 
        {
-            char buf[256];
+            wxChar buf[256];
 
-            wxGetTempFileName( "wxhtml", buf);
+            wxGetTempFileName( _T("wxhtml"), buf);
             info = new wxInetCacheNode(buf, content);
             m_Cache.Put(right, info);
 
index cb194e82d39564ebadb794ab80a7281a6d7802e6..18beaf43cf816fe5b0ba69d5149bf45ff438de94 100644 (file)
@@ -180,11 +180,6 @@ bool wxHTTP::BuildRequest(const wxString& path, wxHTTP_Req req)
 {
   wxChar *tmp_buf;
   wxChar buf[200]; // 200 is arbitrary.
-#if wxUNICODE
-  wxWX2MBbuf pathbuf((size_t)200);
-#else
-  const wxWX2MBbuf pathbuf;
-#endif
   wxString tmp_str;
 
   switch (req) {
@@ -201,7 +196,7 @@ bool wxHTTP::BuildRequest(const wxString& path, wxHTTP_Req req)
 
   tmp_str = wxURL::ConvertToValidURI(path);
   wxSprintf(buf, _T("%s %s HTTP/1.0\n\r"), tmp_buf, tmp_str.GetData());
-  pathbuf = wxConvLibc.cWX2MB(buf);
+  const wxWX2MBbuf pathbuf = wxConvLibc.cWX2MB(buf);
   Write(pathbuf, strlen(MBSTRINGCAST pathbuf));
   SendHeaders();
   Write("\n\r", 2);