@@ -59,9 +59,6 @@ XGStringW xg_strNotes;
5959// 排他制御のためのクリティカルセクション(ロック)。
6060CRITICAL_SECTION xg_csLock;
6161
62- // キャンセル管理マネージャー(現在アクティブなもの)。
63- XG_CancellationManager* xg_pCancellationManager = nullptr ;
64-
6562// キャレットの位置。
6663XG_Pos xg_caret_pos = {0 , 0 };
6764
@@ -3944,10 +3941,6 @@ void __fastcall XgSolveXWord_AddBlackRecurse(const XG_Board& xw)
39443941 if (xw.GetAt (i) == ZEN_BLACK )
39453942 xg_xword.SetAt (i, ZEN_BLACK );
39463943 }
3947- // 完了を通知。
3948- if (xg_pCancellationManager != nullptr ) {
3949- xg_pCancellationManager->SetCompleted ();
3950- }
39513944 }
39523945 ::LeaveCriticalSection (&xg_csLock);
39533946}
@@ -4169,7 +4162,6 @@ void __fastcall XgSolveXWord_NoAddBlackRecurse(const XG_Board& xw)
41694162 }
41704163
41714164 // 解かどうか?
4172- bool should_set_completed = false ;
41734165 ::EnterCriticalSection (&xg_csLock);
41744166 if (!xg_bCancelled && !xg_bSolved && xw.IsSolution ()) { // 解だった。
41754167 xg_bSolved = true ;
@@ -4183,15 +4175,8 @@ void __fastcall XgSolveXWord_NoAddBlackRecurse(const XG_Board& xw)
41834175 if (xw.GetAt (i) == ZEN_BLACK )
41844176 xg_xword.SetAt (i, ZEN_BLACK );
41854177 }
4186-
4187- should_set_completed = (xg_pCancellationManager != nullptr );
41884178 }
41894179 ::LeaveCriticalSection (&xg_csLock);
4190-
4191- // 完了を通知(ロックの外で)。
4192- if (should_set_completed) {
4193- xg_pCancellationManager->SetCompleted ();
4194- }
41954180}
41964181
41974182// 縦と横を入れ替える。
@@ -7379,10 +7364,6 @@ bool __fastcall XgGenerateBlacksRecurse(const XG_Board& xword, LONG iRowjCol)
73797364 if (!xg_bCancelled && !xg_bBlacksGenerated) {
73807365 xg_bBlacksGenerated = true ;
73817366 xg_xword = xword;
7382- // 完了を通知。
7383- if (xg_pCancellationManager != nullptr ) {
7384- xg_pCancellationManager->SetCompleted ();
7385- }
73867367 }
73877368 ::LeaveCriticalSection (&xg_csLock);
73887369 return xg_bBlacksGenerated || xg_bCancelled;
@@ -7501,10 +7482,6 @@ bool __fastcall XgGenerateBlacksPointSymRecurse(const XG_Board& xword, LONG iRow
75017482 if (!xg_bCancelled && !xg_bBlacksGenerated) {
75027483 xg_bBlacksGenerated = true ;
75037484 xg_xword = xword;
7504- // 完了を通知。
7505- if (xg_pCancellationManager != nullptr ) {
7506- xg_pCancellationManager->SetCompleted ();
7507- }
75087485 }
75097486 ::LeaveCriticalSection (&xg_csLock);
75107487 return xg_bBlacksGenerated || xg_bCancelled;
@@ -7626,10 +7603,6 @@ bool __fastcall XgGenerateBlacksLineSymVRecurse(const XG_Board& xword, LONG iRow
76267603 if (!xg_bCancelled && !xg_bBlacksGenerated) {
76277604 xg_bBlacksGenerated = true ;
76287605 xg_xword = xword;
7629- // 完了を通知。
7630- if (xg_pCancellationManager != nullptr ) {
7631- xg_pCancellationManager->SetCompleted ();
7632- }
76337606 }
76347607 ::LeaveCriticalSection (&xg_csLock);
76357608 return xg_bBlacksGenerated || xg_bCancelled;
@@ -7766,10 +7739,6 @@ bool __fastcall XgGenerateBlacksLineSymHRecurse(const XG_Board& xword, LONG iRow
77667739 if (!xg_bCancelled && !xg_bBlacksGenerated) {
77677740 xg_bBlacksGenerated = true ;
77687741 xg_xword = xword;
7769- // 完了を通知。
7770- if (xg_pCancellationManager != nullptr ) {
7771- xg_pCancellationManager->SetCompleted ();
7772- }
77737742 }
77747743 ::LeaveCriticalSection (&xg_csLock);
77757744 return xg_bBlacksGenerated || xg_bCancelled;
0 commit comments