[Ttssh2-commit] [8021] 不要な const 削除

Back to archive index
scmno****@osdn***** scmno****@osdn*****
2019年 8月 27日 (火) 23:38:58 JST


Revision: 8021
          https://osdn.net/projects/ttssh2/scm/svn/commits/8021
Author:   zmatsuo
Date:     2019-08-27 23:38:57 +0900 (Tue, 27 Aug 2019)
Log Message:
-----------
不要な const 削除

Modified Paths:
--------------
    branches/unicode_buf/teraterm/common/codeconv.cpp

-------------- next part --------------
Modified: branches/unicode_buf/teraterm/common/codeconv.cpp
===================================================================
--- branches/unicode_buf/teraterm/common/codeconv.cpp	2019-08-25 14:54:59 UTC (rev 8020)
+++ branches/unicode_buf/teraterm/common/codeconv.cpp	2019-08-27 14:38:57 UTC (rev 8021)
@@ -946,7 +946,7 @@
 		return NULL;
 	}
 	char *strA = _WideCharToMultiByte(strW, 0, CP_ACP, NULL);
-	free((void *)strW);
+	free(strW);
 	return strA;
 }
 
@@ -975,12 +975,12 @@
 
 char *ToU8A(const char *strA)
 {
-	const wchar_t *strW = _MultiByteToWideChar(strA, 0, CP_ACP, NULL);
+	wchar_t *strW = _MultiByteToWideChar(strA, 0, CP_ACP, NULL);
 	if (strW == NULL) {
 		return NULL;
 	}
 	char *strU8 = _WideCharToMultiByte(strW, 0, CP_UTF8, NULL);
-	free((void *)strW);
+	free(strW);
 	return strU8;
 }
 
@@ -1190,9 +1190,9 @@
 
 tc tc::fromUtf8(const char *strU8)
 {
-	const wchar_t *strW = _MultiByteToWideChar(strU8, 0, CP_UTF8, NULL);
+	wchar_t *strW = _MultiByteToWideChar(strU8, 0, CP_UTF8, NULL);
 	tc _tc = strW;
-	free((void *)strW);
+	free(strW);
 	return _tc;
 }
 


Ttssh2-commit メーリングリストの案内
Back to archive index