Fixed cppChecker reported issues
1. Removed unused variable/code smarthighlighter.cpp, Babtgrid.cpp, shortcut.h, ImageListSet.h 2. Member variable not initialised in ctor ShortcutMapper.h, FileBrowser.h, ProjectPanel.h, TaskList.h, VerticalFileSwitcher.h, WindowDlg.h, lastRecentFileList.h Closes #3478
This commit is contained in:
parent
b859303148
commit
ee69531823
|
@ -130,7 +130,6 @@ void SmartHighlighter::highlightView(ScintillaEditView * pHighlightView, Scintil
|
||||||
|
|
||||||
// Determine mode for SmartHighlighting
|
// Determine mode for SmartHighlighting
|
||||||
bool isWordOnly = true;
|
bool isWordOnly = true;
|
||||||
bool isCaseSensentive = true;
|
|
||||||
|
|
||||||
if (nppGUI._smartHiliteUseFindSettings)
|
if (nppGUI._smartHiliteUseFindSettings)
|
||||||
{
|
{
|
||||||
|
@ -138,12 +137,10 @@ void SmartHighlighter::highlightView(ScintillaEditView * pHighlightView, Scintil
|
||||||
NppParameters *nppParams = NppParameters::getInstance();
|
NppParameters *nppParams = NppParameters::getInstance();
|
||||||
FindHistory &findHistory = nppParams->getFindHistory();
|
FindHistory &findHistory = nppParams->getFindHistory();
|
||||||
isWordOnly = findHistory._isMatchWord;
|
isWordOnly = findHistory._isMatchWord;
|
||||||
isCaseSensentive = findHistory._isMatchCase;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
isWordOnly = nppGUI._smartHiliteWordOnly;
|
isWordOnly = nppGUI._smartHiliteWordOnly;
|
||||||
isCaseSensentive = nppGUI._smartHiliteCaseSensitive;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// additional checks for wordOnly mode
|
// additional checks for wordOnly mode
|
||||||
|
|
|
@ -172,7 +172,7 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
TreeView _treeView;
|
TreeView _treeView;
|
||||||
HIMAGELIST _hImaLst;
|
HIMAGELIST _hImaLst = nullptr;
|
||||||
|
|
||||||
HMENU _hGlobalMenu = NULL;
|
HMENU _hGlobalMenu = NULL;
|
||||||
HMENU _hRootMenu = NULL;
|
HMENU _hRootMenu = NULL;
|
||||||
|
|
|
@ -1299,19 +1299,10 @@ void SizeGrid(HWND hWnd,int /*SI*/)
|
||||||
|
|
||||||
int FindLongestLine(HDC hdc,TCHAR* text,SIZE* size)
|
int FindLongestLine(HDC hdc,TCHAR* text,SIZE* size)
|
||||||
{
|
{
|
||||||
int longest, lines;
|
int longest = 0;
|
||||||
TCHAR temptext[1000];
|
TCHAR temptext[1000];
|
||||||
TCHAR *p;
|
TCHAR *p;
|
||||||
longest=0;
|
|
||||||
lines=1;
|
|
||||||
|
|
||||||
for(size_t j=0, len=lstrlen(text); j<len; j++)
|
|
||||||
{
|
|
||||||
if(text[j]=='\n')
|
|
||||||
{
|
|
||||||
lines++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
lstrcpy(temptext,text);
|
lstrcpy(temptext,text);
|
||||||
p = generic_strtok(temptext, TEXT("\n"));
|
p = generic_strtok(temptext, TEXT("\n"));
|
||||||
while(p)
|
while(p)
|
||||||
|
@ -1324,7 +1315,7 @@ int FindLongestLine(HDC hdc,TCHAR* text,SIZE* size)
|
||||||
p = generic_strtok('\0', TEXT("\n"));
|
p = generic_strtok('\0', TEXT("\n"));
|
||||||
}
|
}
|
||||||
return longest;
|
return longest;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
LRESULT CALLBACK GridProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
LRESULT CALLBACK GridProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
|
@ -78,7 +78,7 @@ private:
|
||||||
ContextMenu _rightClickMenu;
|
ContextMenu _rightClickMenu;
|
||||||
|
|
||||||
GridState _currentState;
|
GridState _currentState;
|
||||||
HWND _hTabCtrl;
|
HWND _hTabCtrl = nullptr;
|
||||||
|
|
||||||
TCHAR tabNames[5][maxTabName];
|
TCHAR tabNames[5][maxTabName];
|
||||||
|
|
||||||
|
|
|
@ -111,7 +111,6 @@ public :
|
||||||
};
|
};
|
||||||
|
|
||||||
unsigned int getNbCommand() const {return _nbCmd;};
|
unsigned int getNbCommand() const {return _nbCmd;};
|
||||||
int getCommandAt(int index) const {return _cmdArray[index];};
|
|
||||||
void resizeIcon(int size) {
|
void resizeIcon(int size) {
|
||||||
reInit(size);
|
reInit(size);
|
||||||
};
|
};
|
||||||
|
@ -134,7 +133,6 @@ public :
|
||||||
|
|
||||||
private :
|
private :
|
||||||
ToolBarIconIDs _tbiis;
|
ToolBarIconIDs _tbiis;
|
||||||
int _cmdArray[nbMax];
|
|
||||||
unsigned int _nbCmd;
|
unsigned int _nbCmd;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -106,7 +106,7 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
TreeView _treeView;
|
TreeView _treeView;
|
||||||
HIMAGELIST _hImaLst;
|
HIMAGELIST _hImaLst = nullptr;
|
||||||
HWND _hToolbarMenu = nullptr;
|
HWND _hToolbarMenu = nullptr;
|
||||||
HMENU _hWorkSpaceMenu = nullptr;
|
HMENU _hWorkSpaceMenu = nullptr;
|
||||||
HMENU _hProjectMenu = nullptr;
|
HMENU _hProjectMenu = nullptr;
|
||||||
|
|
|
@ -77,7 +77,7 @@ protected :
|
||||||
private :
|
private :
|
||||||
TaskList _taskList;
|
TaskList _taskList;
|
||||||
TaskListInfo _taskListInfo;
|
TaskListInfo _taskListInfo;
|
||||||
HIMAGELIST _hImalist;
|
HIMAGELIST _hImalist = nullptr;
|
||||||
bool _initDir = false;
|
bool _initDir = false;
|
||||||
HHOOK _hHooker = nullptr;
|
HHOOK _hHooker = nullptr;
|
||||||
|
|
||||||
|
|
|
@ -104,6 +104,6 @@ protected:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
VerticalFileSwitcherListView _fileListView;
|
VerticalFileSwitcherListView _fileListView;
|
||||||
HIMAGELIST _hImaLst;
|
HIMAGELIST _hImaLst = nullptr;
|
||||||
};
|
};
|
||||||
#endif // VERTICALFILESWITCHER_H
|
#endif // VERTICALFILESWITCHER_H
|
||||||
|
|
|
@ -116,6 +116,6 @@ public:
|
||||||
void initPopupMenu(HMENU hMenu, DocTabView *pTab);
|
void initPopupMenu(HMENU hMenu, DocTabView *pTab);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
HMENU _hMenu;
|
HMENU _hMenu = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -388,7 +388,6 @@ public:
|
||||||
ScintillaAccelerator() {};
|
ScintillaAccelerator() {};
|
||||||
void init(std::vector<HWND> * vScintillas, HMENU hMenu, HWND menuParent);
|
void init(std::vector<HWND> * vScintillas, HMENU hMenu, HWND menuParent);
|
||||||
void updateKeys();
|
void updateKeys();
|
||||||
void updateKey(ScintillaKeyMap skmOld, ScintillaKeyMap skm);
|
|
||||||
size_t nbScintillas() { return _vScintillas.size(); };
|
size_t nbScintillas() { return _vScintillas.size(); };
|
||||||
private:
|
private:
|
||||||
HMENU _hAccelMenu = nullptr;
|
HMENU _hAccelMenu = nullptr;
|
||||||
|
|
|
@ -44,6 +44,8 @@ class LastRecentFileList
|
||||||
public:
|
public:
|
||||||
LastRecentFileList() {
|
LastRecentFileList() {
|
||||||
_userMax = (NppParameters::getInstance())->getNbMaxRecentFile();
|
_userMax = (NppParameters::getInstance())->getNbMaxRecentFile();
|
||||||
|
for (int i = 0; i < NB_MAX_LRF_FILE; i++)
|
||||||
|
_idFreeArray[i] = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
void initMenu(HMENU hMenu, int idBase, int posBase, Accelerator *accelerator, bool doSubMenu = false);
|
void initMenu(HMENU hMenu, int idBase, int posBase, Accelerator *accelerator, bool doSubMenu = false);
|
||||||
|
|
Loading…
Reference in New Issue