Fix minor coding error & remove unused variables

This commit is contained in:
Don HO 2020-05-10 05:19:08 +02:00
parent c80a5c13f1
commit ade01204c8
No known key found for this signature in database
GPG Key ID: 6C429F1D8D84F46E
10 changed files with 9 additions and 18 deletions

View File

@ -4879,7 +4879,7 @@ void NppParameters::feedGUIParameters(TiXmlNode *node)
const TCHAR *bDir = element->Attribute(TEXT("useCustumDir")); const TCHAR *bDir = element->Attribute(TEXT("useCustumDir"));
if (bDir) if (bDir)
{ {
_nppGUI._useDir = (lstrcmp(bDir, TEXT("yes")) == 0);; _nppGUI._useDir = (lstrcmp(bDir, TEXT("yes")) == 0);
} }
const TCHAR *pDir = element->Attribute(TEXT("dir")); const TCHAR *pDir = element->Attribute(TEXT("dir"));
if (pDir) if (pDir)

View File

@ -52,7 +52,7 @@ public:
private: private:
std::vector<MatchedCharInserted> _insertedMatchedChars; std::vector<MatchedCharInserted> _insertedMatchedChars;
ScintillaEditView * _pEditView = nullptr;; ScintillaEditView * _pEditView = nullptr;
}; };
class AutoCompletion { class AutoCompletion {

View File

@ -74,7 +74,7 @@ private:
void reset(); //reset all vars in case function is invalidated void reset(); //reset all vars in case function is invalidated
void cleanup(); //delete any leftovers void cleanup(); //delete any leftovers
bool isBasicWordChar(TCHAR ch) const { bool isBasicWordChar(TCHAR ch) const {
return (ch >= 'A' && ch <= 'Z' || ch >= 'a' && ch <= 'z' || ch >= '0' && ch <= '9' || ch == '_'); return ((ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z') || (ch >= '0' && ch <= '9') || ch == '_');
}; };
bool isAdditionalWordChar(TCHAR ch) const { bool isAdditionalWordChar(TCHAR ch) const {
const TCHAR *addChars = _additionalWordChar.c_str(); const TCHAR *addChars = _additionalWordChar.c_str();

View File

@ -1850,7 +1850,6 @@ void ScintillaEditView::restoreCurrentPosPostStep()
if (!_positionRestoreNeeded) if (!_positionRestoreNeeded)
return; return;
static int32_t restoreDone = 0;
Buffer * buf = MainFileManager.getBufferByID(_currentBufferID); Buffer * buf = MainFileManager.getBufferByID(_currentBufferID);
Position & pos = buf->getPosition(this); Position & pos = buf->getPosition(this);

View File

@ -1193,10 +1193,6 @@ int DockingCont::hideToolbar(tTbData *pTbData, BOOL hideClient)
if (iItemCnt != 0) if (iItemCnt != 0)
{ {
TCITEM tcItem = {0};
tcItem.mask = TCIF_PARAM;
if (iItem == iItemCnt) if (iItem == iItemCnt)
{ {
iItem--; iItem--;

View File

@ -1329,7 +1329,6 @@ LRESULT CALLBACK GridProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
HMENU SelfMenu; HMENU SelfMenu;
HINSTANCE hInst; HINSTANCE hInst;
int iDataType; int iDataType;
static int ASCII;
SelfIndex=FindGrid(GetMenu(hWnd)); SelfIndex=FindGrid(GetMenu(hWnd));

View File

@ -280,7 +280,7 @@ void PluginsAdminDlg::create(int dialogID, bool isRTL, bool msgDestParent)
_tab.insertAtEnd(updates); _tab.insertAtEnd(updates);
_tab.insertAtEnd(installed); _tab.insertAtEnd(installed);
rect.bottom -= 100;; rect.bottom -= 100;
_tab.reSizeTo(rect); _tab.reSizeTo(rect);
_tab.display(); _tab.display();

View File

@ -296,7 +296,7 @@ void ToolBar::reset(bool create)
else else
{ {
//Else set the internal imagelist with standard bitmaps //Else set the internal imagelist with standard bitmaps
int iconDpiDynamicalSize = NppParameters::getInstance()._dpiManager.scaleX(16);; int iconDpiDynamicalSize = NppParameters::getInstance()._dpiManager.scaleX(16);
::SendMessage(_hSelf, TB_SETBITMAPSIZE, 0, MAKELPARAM(iconDpiDynamicalSize, iconDpiDynamicalSize)); ::SendMessage(_hSelf, TB_SETBITMAPSIZE, 0, MAKELPARAM(iconDpiDynamicalSize, iconDpiDynamicalSize));
//TBADDBITMAP addbmp = {_hInst, 0}; //TBADDBITMAP addbmp = {_hInst, 0};

View File

@ -820,7 +820,7 @@ void WindowsDlg::doClose()
nmdlg.Items = new UINT[nmdlg.nItems]; nmdlg.Items = new UINT[nmdlg.nItems];
vector<int> key; vector<int> key;
key.resize(n, 0x7fffffff); key.resize(n, 0x7fffffff);
for (int i=-1, j=0;; ++j) for (int i=-1, j=0; ; ++j)
{ {
i = ListView_GetNextItem(_hList, i, LVNI_SELECTED); i = ListView_GetNextItem(_hList, i, LVNI_SELECTED);
if (i == -1) break; if (i == -1) break;
@ -880,7 +880,7 @@ void WindowsDlg::doSortToTabs()
nmdlg.nItems = ListView_GetItemCount(_hList); nmdlg.nItems = ListView_GetItemCount(_hList);
nmdlg.Items = new UINT[nmdlg.nItems]; nmdlg.Items = new UINT[nmdlg.nItems];
for (int i=-1, j=0;; ++j) for (int i=-1, j=0; ; ++j)
{ {
i = ListView_GetNextItem(_hList, i, LVNI_ALL); i = ListView_GetNextItem(_hList, i, LVNI_ALL);
if (i == -1) if (i == -1)

View File

@ -1613,7 +1613,6 @@ static void ColouriseUserDoc(Sci_PositionU startPos, Sci_Position length, int in
int nlCount = 0; int nlCount = 0;
int continueCommentBlock = 0; int continueCommentBlock = 0;
bool startOfDelimiter = false;
int decSeparator = SEPARATOR_DOT; int decSeparator = SEPARATOR_DOT;
vector<nestedInfo> lastNestedGroup; vector<nestedInfo> lastNestedGroup;
@ -2003,8 +2002,7 @@ static void ColouriseUserDoc(Sci_PositionU startPos, Sci_Position length, int in
dontMove = true; dontMove = true;
if (sc.atLineEnd) if (sc.atLineEnd)
checkEOL = EOL_SKIP_CHECK; checkEOL = EOL_SKIP_CHECK;
if (lineCommentNesting & SCE_USER_MASK_NESTING_NUMBERS)
startOfDelimiter = true;
break; break;
} }
} }
@ -2034,8 +2032,7 @@ static void ColouriseUserDoc(Sci_PositionU startPos, Sci_Position length, int in
dontMove = true; dontMove = true;
if (sc.atLineEnd) if (sc.atLineEnd)
checkEOL = EOL_SKIP_CHECK; checkEOL = EOL_SKIP_CHECK;
if (commentNesting & SCE_USER_MASK_NESTING_NUMBERS)
startOfDelimiter = true;
break; break;
} }
} }