From ab92c2a5cd5427bf8a33d06afdb64b88d2d640ed Mon Sep 17 00:00:00 2001 From: Vadim Dashevskiy Date: Wed, 6 Jun 2012 20:17:58 +0000 Subject: Twitter updated git-svn-id: http://svn.miranda-ng.org/main/trunk@337 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Twitter/http.cpp | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'protocols/Twitter/http.cpp') diff --git a/protocols/Twitter/http.cpp b/protocols/Twitter/http.cpp index 63218ca616..ef295f4ab0 100644 --- a/protocols/Twitter/http.cpp +++ b/protocols/Twitter/http.cpp @@ -15,23 +15,16 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "common.h" #include "http.h" -std::string http::url_encode(const std::string &s) -{ - char *encoded = (char*)CallService( MS_NETLIB_URLENCODE, 0, ( LPARAM )s.c_str()); - std::string ret = encoded; - HeapFree(GetProcessHeap(),0,encoded); +#include +#include +#include - return ret; -} - -std::string http::url_encode(const std::wstring &s) +std::string http::url_encode(const std::string &s) { - char* data = mir_u2a( s.c_str()); - char *encoded = (char*)CallService( MS_NETLIB_URLENCODE, 0, ( LPARAM )data); - mir_free( data ); + char *encoded = reinterpret_cast(CallService( MS_NETLIB_URLENCODE, + 0,reinterpret_cast(s.c_str()) )); std::string ret = encoded; HeapFree(GetProcessHeap(),0,encoded); -- cgit v1.2.3