[Ttssh2-commit] [8521] (DWORD)-1 でエラー、使用しないよう修正

scmno****@osdn***** scmno****@osdn*****
2020年 2月 1日 (土) 00:37:51 JST


Revision: 8521
          https://osdn.net/projects/ttssh2/scm/svn/commits/8521
Author:   zmatsuo
Date:     2020-02-01 00:37:51 +0900 (Sat, 01 Feb 2020)
Log Message:
-----------
(DWORD)-1 でエラー、使用しないよう修正

- IDOK 以内は不要なので削除
- error: case value evaluates to 4294967295,
  which cannot be narrowed to type 'INT_PTR' (aka 'int') [-Wc++11-narrowing]
- clang version 9.0.0 32bit

Modified Paths:
--------------
    trunk/teraterm/teraterm/vtwin.cpp

-------------- next part --------------
Modified: trunk/teraterm/teraterm/vtwin.cpp
===================================================================
--- trunk/teraterm/teraterm/vtwin.cpp	2020-01-31 15:37:35 UTC (rev 8520)
+++ trunk/teraterm/teraterm/vtwin.cpp	2020-01-31 15:37:51 UTC (rev 8521)
@@ -4742,25 +4742,16 @@
 				  ts.UILanguageFile, "Tera Term", "DLG_TAHOMA_FONT");
 	CAddSettingPropSheetDlg CAddSetting(m_hInst, HVTWin);
 	INT_PTR ret = CAddSetting.DoModal();
-	switch (ret) {
-		case (DWORD)-1:
-		case IDABORT:
-			ret = GetLastError();
-			break;
-		case IDOK:
+	if (ret == IDOK) {
 #ifdef ALPHABLEND_TYPE2
-			BGInitialize(FALSE);
-			BGSetupPrimary(TRUE);
+		BGInitialize(FALSE);
+		BGSetupPrimary(TRUE);
 #else
-			DispApplyANSIColor();
+		DispApplyANSIColor();
 #endif
-			DispSetNearestColors(IdBack, IdFore+8, NULL);
-			ChangeWin();
-			ChangeFont();
-			break;
-		default:
-			/* nothing to do */
-			break;
+		DispSetNearestColors(IdBack, IdFore+8, NULL);
+		ChangeWin();
+		ChangeFont();
 	}
 }
 


Ttssh2-commit メーリングリストの案内