OSDN Git Service

Cppcheck: The function '...' overrides a function in a base class but is not marked...
authorTakashi Sawanaka <sdottaka@users.sourceforge.net>
Sun, 30 Jun 2019 04:44:04 +0000 (13:44 +0900)
committerTakashi Sawanaka <sdottaka@users.sourceforge.net>
Sun, 30 Jun 2019 04:44:04 +0000 (13:44 +0900)
14 files changed:
Src/Common/UniFile.h
Src/CompareStatisticsDlg.h
Src/DiffThread.cpp
Src/DirView.cpp
Src/FileFilterHelper.h
Src/FileFiltersDlg.h
Src/HexMergeDoc.h
Src/IListCtrlImpl.h
Src/ImgMergeFrm.h
Src/MergeDoc.h
Src/PluginManager.h
Src/PluginsListDlg.h
Src/SelectUnpackerDlg.h
Src/TestFilterDlg.h

index 50e8724..3b6318e 100644 (file)
@@ -211,15 +211,15 @@ protected:
        virtual bool ReadString(String & line, String & eol, bool * lossy) override;
 
 public:
-       virtual int64_t GetPosition() const;
+       virtual int64_t GetPosition() const override;
 
        virtual int WriteBom();
-       virtual bool WriteString(const String & line);
+       virtual bool WriteString(const String & line) override;
 
 // Implementation methods
 protected:
        virtual bool DoOpen(const String& filename, const String& mode);
-       virtual void LastErrorCustom(const String& desc);
+       virtual void LastErrorCustom(const String& desc) override;
 
 // Implementation data
 private:
index 7785642..7aa5c41 100644 (file)
@@ -45,7 +45,7 @@ public:
 protected:
        // Generated message map functions
        //{{AFX_MSG(CompareStatisticsDlg)
-       afx_msg BOOL OnInitDialog();
+       afx_msg BOOL OnInitDialog() override;
        //}}AFX_MSG
        DECLARE_MESSAGE_MAP()
 
index b464fdf..69507af 100644 (file)
@@ -43,7 +43,7 @@ class DiffThreadAbortable : public IAbortable
 {
 // Implement DirScan's IAbortable
 public:
-       virtual bool ShouldAbort() const { return m_diffthread->ShouldAbort(); }
+       virtual bool ShouldAbort() const override { return m_diffthread->ShouldAbort(); }
 
 // All this object does is forward ShouldAbort calls to its containing CDiffThread
 
index 74fc555..4426f42 100644 (file)
@@ -2549,7 +2549,7 @@ std::vector<String> CDirView::GetCurrentColRegKeys()
 struct FileCmpReport: public IFileCmpReport
 {
        explicit FileCmpReport(CDirView *pDirView) : m_pDirView(pDirView) {}
-       bool operator()(REPORT_TYPE nReportType, IListCtrl *pList, int nIndex, const String &sDestDir, String &sLinkPath)
+       bool operator()(REPORT_TYPE nReportType, IListCtrl *pList, int nIndex, const String &sDestDir, String &sLinkPath) override
        {
                const CDiffContext& ctxt = m_pDirView->GetDiffContext();
                const DIFFITEM &di = m_pDirView->GetDiffItem(nIndex);
index ca47c14..6fd7348 100644 (file)
@@ -143,8 +143,8 @@ public:
        String GetFilterNameOrMask() const;
        bool SetFilter(const String &filter);
 
-       bool includeFile(const String& szFileName) const;
-       bool includeDir(const String& szDirName) const;
+       bool includeFile(const String& szFileName) const override;
+       bool includeDir(const String& szDirName) const override;
 
 protected:
        String ParseExtensions(const String &extensions) const;
index 552cf12..bd63781 100644 (file)
@@ -71,7 +71,7 @@ protected:
 
        // Generated message map functions
        //{{AFX_MSG(FileFiltersDlg)
-       virtual BOOL OnInitDialog();
+       virtual BOOL OnInitDialog() override;
        virtual void OnOK();
        afx_msg void OnFiltersEditbtn();
        afx_msg void OnDblclkFiltersList(NMHDR* pNMHDR, LRESULT* pResult);
index d43da71..34551c1 100644 (file)
@@ -77,16 +77,16 @@ public:
        ~CHexMergeDoc();
        int UpdateDiffItem(CDirDoc * pDirDoc);
        bool PromptAndSaveIfNeeded(bool bAllowCancel);
-       void SetDirDoc(CDirDoc * pDirDoc);
-       void DirDocClosing(CDirDoc * pDirDoc);
-       bool CloseNow();
-       bool GenerateReport(const String& sFileName) const { return true; }
+       void SetDirDoc(CDirDoc * pDirDoc) override;
+       void DirDocClosing(CDirDoc * pDirDoc) override;
+       bool CloseNow() override;
+       bool GenerateReport(const String& sFileName) const override { return true; }
        CHexMergeFrame * GetParentFrame() const;
        void UpdateHeaderPath(int pane);
        void RefreshOptions();
        bool OpenDocs(int nFiles, const FileLocation fileloc[], const bool bRO[], const String strDesc[]);
        void MoveOnLoad(int nPane = -1, int nLineIndex = -1);
-       void CheckFileChanged(void);
+       void CheckFileChanged(void) override;
        String GetDescription(int pane) const { return m_strDesc[pane]; };
 private:
        void DoFileSave(int nBuffer);
index 2a6fa7e..78a8e20 100644 (file)
@@ -11,17 +11,17 @@ public:
        {\r
        }\r
 \r
-       int GetColumnCount() const\r
+       int GetColumnCount() const override\r
        {\r
                return Header_GetItemCount(ListView_GetHeader(m_hwndListCtrl));\r
        }\r
 \r
-       int GetRowCount() const\r
+       int GetRowCount() const override\r
        {\r
                return ListView_GetItemCount(m_hwndListCtrl);\r
        }\r
 \r
-       String GetColumnName(int col) const\r
+       String GetColumnName(int col) const override\r
        {\r
                LVCOLUMN lvc;\r
                TCHAR columnName[256]; // Assuming max col header will never be > 256\r
@@ -32,7 +32,7 @@ public:
                return lvc.pszText;\r
        }\r
 \r
-       String GetItemText(int row, int col) const\r
+       String GetItemText(int row, int col) const override\r
        {\r
                TCHAR text[512]; // Assuming max col header will never be > 512\r
                text[0] = '\0';\r
@@ -40,7 +40,7 @@ public:
                return text;\r
        }\r
 \r
-       void *GetItemData(int row) const\r
+       void *GetItemData(int row) const override\r
        {\r
                LVITEM lvi = {0};\r
                lvi.iItem = row;\r
@@ -49,7 +49,7 @@ public:
                return (void *)lvi.lParam;\r
        }\r
 \r
-       int GetBackColor(int row) const\r
+       int GetBackColor(int row) const override\r
        {\r
                NMLVCUSTOMDRAW nmlvcd = {0};\r
                nmlvcd.nmcd.hdr.code = NM_CUSTOMDRAW;\r
@@ -61,27 +61,27 @@ public:
                return nmlvcd.clrTextBk;\r
        }\r
 \r
-       bool IsSelectedItem(int sel) const\r
+       bool IsSelectedItem(int sel) const override\r
        {\r
                return !!ListView_GetItemState(m_hwndListCtrl, sel, LVIS_SELECTED);\r
        }\r
 \r
-       int GetNextItem(int sel, bool selected = false, bool reverse = false) const\r
+       int GetNextItem(int sel, bool selected = false, bool reverse = false) const override\r
        {\r
                return ListView_GetNextItem(m_hwndListCtrl, sel, (selected ? LVNI_SELECTED : 0) | (reverse ? LVNI_ABOVE : 0));          \r
        }\r
 \r
-       int GetNextSelectedItem(int sel, bool reverse = false) const\r
+       int GetNextSelectedItem(int sel, bool reverse = false) const override\r
        {\r
                return ListView_GetNextItem(m_hwndListCtrl, sel, LVNI_SELECTED | (reverse ? LVNI_ABOVE : 0));           \r
        }\r
 \r
-       unsigned GetSelectedCount() const\r
+       unsigned GetSelectedCount() const override\r
        {\r
                return ListView_GetSelectedCount(m_hwndListCtrl);\r
        }\r
 \r
-       int GetIndent(int row) const\r
+       int GetIndent(int row) const override\r
        {\r
                LVITEM item = {0};\r
                item.mask = LVIF_INDENT;\r
@@ -90,7 +90,7 @@ public:
                return item.iIndent;\r
        }\r
 \r
-       int GetIconIndex(int row) const\r
+       int GetIconIndex(int row) const override\r
        {\r
                LVITEM item = {0};\r
                item.mask = LVIF_IMAGE;\r
@@ -99,13 +99,13 @@ public:
                return item.iImage;\r
        }\r
 \r
-       int GetIconCount() const\r
+       int GetIconCount() const override\r
        {\r
                HIMAGELIST hImageList = ListView_GetImageList(m_hwndListCtrl, LVSIL_SMALL);\r
                return ImageList_GetImageCount(hImageList);\r
        }\r
 \r
-       std::string GetIconPNGData(int iconIndex) const\r
+       std::string GetIconPNGData(int iconIndex) const override\r
        {\r
                HIMAGELIST hImageList = ListView_GetImageList(m_hwndListCtrl, LVSIL_SMALL);\r
                IMAGEINFO imageInfo;\r
index f754cbe..893c685 100644 (file)
@@ -62,18 +62,18 @@ public:
        bool OpenDocs(int nFiles, const FileLocation fileloc[], const bool bRO[], const String strDesc[], CMDIFrameWnd *pParent);
        void MoveOnLoad(int nPane = -1, int nLineIndex = -1);
        void ChangeFile(int pane, const String& path);
-       void SetDirDoc(CDirDoc * pDirDoc);
+       void SetDirDoc(CDirDoc * pDirDoc) override;
        void UpdateResources();
-       bool CloseNow();
-       void DirDocClosing(CDirDoc * pDirDoc) { m_pDirDoc = nullptr; }
+       bool CloseNow() override;
+       void DirDocClosing(CDirDoc * pDirDoc) override { m_pDirDoc = nullptr; }
        void UpdateLastCompareResult();
        void UpdateAutoPaneResize();
        void UpdateSplitter();
-       bool GenerateReport(const String& sFileName) const;
+       bool GenerateReport(const String& sFileName) const override;
        void DoAutoMerge(int dstPane);
        bool IsModified() const;
        bool IsFileChangedOnDisk(int pane) const;
-       void CheckFileChanged(void);
+       void CheckFileChanged(void) override;
        String GetDescription(int pane) const { return m_strDesc[pane]; }
        static bool IsLoadable();
 
index 3f504e2..9ad6d43 100644 (file)
@@ -184,7 +184,7 @@ public:
        void ChangeFile(int nBuffer, const String& path);
        void RescanIfNeeded(float timeOutInSecond);
        int Rescan(bool &bBinary, IDENTLEVEL &identical, bool bForced = false);
-       void CheckFileChanged(void);
+       void CheckFileChanged(void) override;
        int ShowMessageBox(const String& sText, unsigned nType = MB_OK, unsigned nIDHelp = 0);
        void ShowRescanError(int nRescanResult, IDENTLEVEL identical);
        bool Undo();
@@ -210,10 +210,10 @@ public:
        void RemoveMergeViews(int nGroup);
        void SetLocationView(CLocationView *pLocationView) { m_pLocationView = pLocationView; }
 
-       void SetDirDoc(CDirDoc * pDirDoc);
+       void SetDirDoc(CDirDoc * pDirDoc) override;
        CDirDoc * GetDirDoc() const { return m_pDirDoc; }
-       void DirDocClosing(CDirDoc * pDirDoc);
-       bool CloseNow();
+       void DirDocClosing(CDirDoc * pDirDoc) override;
+       bool CloseNow() override;
        void SwapFiles();
 
        CMergeEditView * GetView(int group, int buffer) const { return m_pView[group][buffer]; }
@@ -304,7 +304,7 @@ public:
        void SetDetectMovedBlocks(bool bDetectMovedBlocks);
        bool IsMixedEOL(int nBuffer) const;
        bool OpenWithUnpackerDialog();
-       bool GenerateReport(const String& sFileName) const;
+       bool GenerateReport(const String& sFileName) const override;
        void SetAutoMerged(bool bAutoMerged) { m_bAutoMerged = bAutoMerged; }
        bool GetAutoMerged() const { return m_bAutoMerged; };
        bool IsModified() const
index 4952887..5929c01 100644 (file)
@@ -35,7 +35,7 @@ public:
        // Implement IPluginInfos
        virtual void FetchPluginInfos(const String& filteredFilenames, 
                                       PackingInfo ** infoUnpacker, 
-                                      PrediffingInfo ** infoPrediffer);
+                                      PrediffingInfo ** infoPrediffer) override;
 private:
        // Data
        PluginFileInfoMap m_pluginSettings;
index a4f5722..27c31be 100644 (file)
@@ -32,7 +32,7 @@ protected:
 
        virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
 
-       afx_msg BOOL OnInitDialog();
+       afx_msg BOOL OnInitDialog() override;
        afx_msg void OnBnClickedOk();
        afx_msg void OnBnClickedPluginSettings();
        afx_msg void OnNMDblclkList(NMHDR *pNMHDR, LRESULT *pResult);
index f97d1dc..55c77f9 100644 (file)
@@ -92,7 +92,7 @@ protected:
        // Generated message map functions
        //{{AFX_MSG(CSelectUnpackerDlg)
        virtual void OnOK();
-       virtual BOOL OnInitDialog();
+       virtual BOOL OnInitDialog() override;
        afx_msg void OnUnpackerAllowAll();
        afx_msg void OnSelchangeUnpackerName();
        //}}AFX_MSG
index 3d03108..3bf392e 100644 (file)
@@ -48,7 +48,7 @@ private:
 
        // Generated message map functions
        //{{AFX_MSG(CTestFilterDlg)
-       virtual BOOL OnInitDialog();
+       virtual BOOL OnInitDialog() override;
        afx_msg void OnTestBtn();
        //}}AFX_MSG
        DECLARE_MESSAGE_MAP()