summaryrefslogtreecommitdiff
path: root/protocols/Twitter/src/utility.h
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-03-31 16:42:07 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-03-31 16:42:07 +0000
commitd3a10049eee36dc0c451cbed542314a94f62ab3c (patch)
tree546ce7b3a217740e352cb74882ffee4afa0f1f93 /protocols/Twitter/src/utility.h
parentbebfb51465b364d5673a3f555655213dbff0b2c6 (diff)
Twitter:
- unused module removed; - copyright update; - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@12575 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Twitter/src/utility.h')
-rw-r--r--protocols/Twitter/src/utility.h35
1 files changed, 5 insertions, 30 deletions
diff --git a/protocols/Twitter/src/utility.h b/protocols/Twitter/src/utility.h
index a74ec25c36..017fd2e9be 100644
--- a/protocols/Twitter/src/utility.h
+++ b/protocols/Twitter/src/utility.h
@@ -1,4 +1,5 @@
/*
+Copyright © 2012-15 Miranda NG team
Copyright © 2009 Jim Porter
This program is free software: you can redistribute it and/or modify
@@ -86,40 +87,14 @@ protected:
PROTO_INTERFACE *ppro_;
};
-inline void mbcs_to_tcs(UINT code_page,const char *mbstr,TCHAR *tstr,int tlen)
+inline void mbcs_to_tcs(UINT code_page, const char *mbstr, TCHAR *tstr, int tlen)
{
-
- MultiByteToWideChar(code_page,0,mbstr,-1,tstr,tlen);
-
+ MultiByteToWideChar(code_page, 0, mbstr, -1, tstr, tlen);
}
-inline void wcs_to_tcs(UINT code_page,const wchar_t *wstr,TCHAR *tstr,int tlen)
+inline void wcs_to_tcs(UINT code_page, const wchar_t *wstr, TCHAR *tstr, int tlen)
{
-
- wcsncpy(tstr,wstr,tlen);
-
+ wcsncpy(tstr, wstr, tlen);
}
-class ScopedLock
-{
-public:
- ScopedLock(HANDLE h) : handle_(h)
- {
- WaitForSingleObject(handle_,INFINITE);
- }
- ~ScopedLock()
- {
- if(handle_)
- ReleaseMutex(handle_);
- }
-
- void Unlock()
- {
- ReleaseMutex(handle_);
- handle_ = 0;
- }
-private:
- HANDLE handle_;
-};
-
bool save_url(HANDLE hNetlib,const std::string &url,const std::tstring &filename); \ No newline at end of file