OSDN Git Service

Variable '...' in assigned in constructor body. Consider performing initialization...
authorTakashi Sawanaka <sdottaka@users.sourceforge.net>
Sun, 30 Jun 2019 03:10:33 +0000 (12:10 +0900)
committerTakashi Sawanaka <sdottaka@users.sourceforge.net>
Sun, 30 Jun 2019 03:10:33 +0000 (12:10 +0900)
Src/Common/sizecbar.cpp
Src/Common/sizecbar.h
Src/Exceptions.h

index 8115947..41fd67e 100644 (file)
@@ -69,24 +69,6 @@ IMPLEMENT_DYNAMIC(CSizingControlBar, baseCSizingControlBar);
 
 CSizingControlBar::CSizingControlBar()
 {
-    m_szMinHorz = CSize(33, 32);
-    m_szMinVert = CSize(33, 32);
-    m_szMinFloat = CSize(37, 32);
-    m_szHorz = CSize(120, 200);
-    m_szVert = CSize(120, 200);
-    m_szFloat = CSize(120, 200);
-    m_bTracking = false;
-    m_bKeepSize = false;
-    m_bParentSizing = false;
-    m_cxEdge = 5;
-    m_bDragShowContent = false;
-    m_nDockBarID = 0;
-    m_dwSCBStyle = 0;
-       m_htEdge = 0;
-       m_nTrackPosMin = 0;
-       m_nTrackPosMax = 0;
-       m_nTrackPosOld = 0;
-       m_nTrackEdgeOfs = 0;
 }
 
 CSizingControlBar::~CSizingControlBar()
index 144e947..aca78df 100644 (file)
@@ -137,25 +137,25 @@ protected:
     bool NegotiateSpace(int nLengthTotal, bool bHorz);
 
 protected:
-    DWORD   m_dwSCBStyle;
-    UINT    m_htEdge;
-
-    CSize   m_szHorz;
-    CSize   m_szVert;
-    CSize   m_szFloat;
-    CSize   m_szMinHorz;
-    CSize   m_szMinVert;
-    CSize   m_szMinFloat;
-    int     m_nTrackPosMin;
-    int     m_nTrackPosMax;
-    int     m_nTrackPosOld;
-    int     m_nTrackEdgeOfs;
-    bool    m_bTracking;
-    bool    m_bKeepSize;
-    bool    m_bParentSizing;
-    bool    m_bDragShowContent;
-    UINT    m_nDockBarID;
-    int     m_cxEdge;
+    DWORD   m_dwSCBStyle = 0;
+    UINT    m_htEdge = 0;
+
+    CSize   m_szHorz = CSize(120, 200);
+    CSize   m_szVert = CSize(120, 200);
+    CSize   m_szFloat = CSize(120, 200);
+    CSize   m_szMinHorz = CSize(33, 32);
+    CSize   m_szMinVert = CSize(33, 32);
+    CSize   m_szMinFloat = CSize(37, 32);
+    int     m_nTrackPosMin = 0;
+    int     m_nTrackPosMax = 0;
+    int     m_nTrackPosOld = 0;
+    int     m_nTrackEdgeOfs = 0;
+    bool    m_bTracking = false;
+    bool    m_bKeepSize = false;
+    bool    m_bParentSizing = false;
+    bool    m_bDragShowContent = false;
+    UINT    m_nDockBarID = 0;
+    int     m_cxEdge = 5;
 
 // Generated message map functions
 protected:
index befb29b..cce7d05 100644 (file)
@@ -119,7 +119,7 @@ private:
                throw SE_Exception((long)dwCode);
        }
 public:
-       SE_Handler() { fnOld = _set_se_translator(seh_trans_func); }
+       SE_Handler() : fnOld{_set_se_translator(seh_trans_func)} {}
        ~SE_Handler() { _set_se_translator(fnOld); }
 #else
 public: