diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2015-06-08 21:10:58 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2015-06-08 21:10:58 +0000 |
commit | 00c46f24d60c9de29293bef608f34114392822d2 (patch) | |
tree | 23710e2cecfcea4df55587b2210de62acb4eeb7e /plugins/MirandaG15/src/LCDFramework | |
parent | 038f6cc65778c17300ce5c62bb25723f7fa16714 (diff) |
MirandaG15:
- Minor fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@14068 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirandaG15/src/LCDFramework')
-rw-r--r-- | plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.cpp | 2 | ||||
-rw-r--r-- | plugins/MirandaG15/src/LCDFramework/CLCDList.h | 3 | ||||
-rw-r--r-- | plugins/MirandaG15/src/LCDFramework/misc.cpp | 8 |
3 files changed, 7 insertions, 6 deletions
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.cpp b/plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.cpp index eb3f2bf513..00a91a2706 100644 --- a/plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.cpp +++ b/plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.cpp @@ -994,7 +994,7 @@ void CLCDConnectionLogitech::SetKBDBacklight(EKBDBrightness eBrightness) HidD_SetFeature(m_hHIDDeviceHandle, data, m_HIDCapabilities.FeatureReportByteLength);
- free(data);
+ delete[] data;
}
void CLCDConnectionLogitech::SetVolumeWheelHook(bool bEnable)
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDList.h b/plugins/MirandaG15/src/LCDFramework/CLCDList.h index 80a6b246cf..8afe19e995 100644 --- a/plugins/MirandaG15/src/LCDFramework/CLCDList.h +++ b/plugins/MirandaG15/src/LCDFramework/CLCDList.h @@ -373,7 +373,8 @@ public: } delete *iter; m_Entrys.erase(iter); - m_pRoot->UpdateEntryCount(); + if (m_pRoot) + m_pRoot->UpdateEntryCount(); return; } } diff --git a/plugins/MirandaG15/src/LCDFramework/misc.cpp b/plugins/MirandaG15/src/LCDFramework/misc.cpp index c553124893..d4a491f446 100644 --- a/plugins/MirandaG15/src/LCDFramework/misc.cpp +++ b/plugins/MirandaG15/src/LCDFramework/misc.cpp @@ -40,7 +40,7 @@ toWideString( const char* pStr , int len ) return L"" ;
//ASSERT_PTR( pStr ) ;
- ASSERT( len >= 0 || len == -1 , _T("Invalid string length: ") << len ) ;
+ ASSERT( len >= 0 || len == -1);
// figure out how many wide characters we are going to get
int nChars = MultiByteToWideChar( CP_ACP , 0 , pStr , len , NULL , 0 ) ;
@@ -65,7 +65,7 @@ string toNarrowString( const wchar_t* pStr , int len )
{
//ASSERT_PTR( pStr ) ;
- ASSERT( len >= 0 || len == -1 , _T("Invalid string length: ") << len ) ;
+ ASSERT( len >= 0 || len == -1) ;
// figure out how many narrow characters we are going to get
int nChars = WideCharToMultiByte( CP_ACP , 0 ,
@@ -113,14 +113,14 @@ tstring Utf8_Decode(const char *str) {
tstring strRes = _T("");
- int i, len;
+ int i;
char *p;
WCHAR *wszTemp = NULL;
if (str == NULL)
return strRes;
- len = mir_strlen(str);
+ size_t len = mir_strlen(str);
if ((wszTemp = (WCHAR *) malloc(sizeof(TCHAR) * (len + 2))) == NULL)
return strRes;
|