Code enhancement: fix clang warnings
- reduced visibility of tagMaxLen to AutoCompletion.cpp - fixed missing init of BoostRegexSearch::_lastDirection, adapted also _substituted - removed unused vars Printer::_nbPageTotal, FunctionListPanel::_hTreeViewImaLst - fileBrowser.cpp(511,35): warning : equality comparison with extraneous parentheses [-Wparentheses-equality] - ProjectPanel.cpp(595,35): warning : equality comparison with extraneous parentheses [-Wparentheses-equality] - removed unused methods IsStateComment(), IsStateString() from LexObjC.cxx - removed unused var KEYWORD_FOLDCONTRACTED from LexObjC.cxx Close #13167
This commit is contained in:
parent
5c10f58212
commit
b9ab516c2c
|
@ -250,6 +250,8 @@ const char* xpmboxDark[] = {
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
constexpr size_t tagMaxLen = 256;
|
||||||
|
|
||||||
static bool isInList(const generic_string& word, const vector<generic_string> & wordArray)
|
static bool isInList(const generic_string& word, const vector<generic_string> & wordArray)
|
||||||
{
|
{
|
||||||
for (size_t i = 0, len = wordArray.size(); i < len; ++i)
|
for (size_t i = 0, len = wordArray.size(); i < len; ++i)
|
||||||
|
|
|
@ -20,8 +20,6 @@
|
||||||
#include "FunctionCallTip.h"
|
#include "FunctionCallTip.h"
|
||||||
#include "tinyxml.h"
|
#include "tinyxml.h"
|
||||||
|
|
||||||
const size_t tagMaxLen = 256;
|
|
||||||
|
|
||||||
class ScintillaEditView;
|
class ScintillaEditView;
|
||||||
|
|
||||||
struct MatchedCharInserted {
|
struct MatchedCharInserted {
|
||||||
|
|
|
@ -47,7 +47,6 @@ private :
|
||||||
ScintillaEditView *_pSEView = nullptr;
|
ScintillaEditView *_pSEView = nullptr;
|
||||||
size_t _startPos = 0;
|
size_t _startPos = 0;
|
||||||
size_t _endPos = 0;
|
size_t _endPos = 0;
|
||||||
size_t _nbPageTotal =0;
|
|
||||||
bool _isRTL = false;
|
bool _isRTL = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -508,7 +508,7 @@ void FileBrowser::notified(LPNMHDR notification)
|
||||||
wcscpy_s(lpttt->szText, _expandAllFolders.c_str());
|
wcscpy_s(lpttt->szText, _expandAllFolders.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ((notification->hwndFrom == _treeView.getHSelf()))
|
else if (notification->hwndFrom == _treeView.getHSelf())
|
||||||
{
|
{
|
||||||
TCHAR textBuffer[MAX_PATH] = { '\0' };
|
TCHAR textBuffer[MAX_PATH] = { '\0' };
|
||||||
TVITEM tvItem;
|
TVITEM tvItem;
|
||||||
|
|
|
@ -131,7 +131,6 @@ private:
|
||||||
FunctionParsersManager _funcParserMgr;
|
FunctionParsersManager _funcParserMgr;
|
||||||
std::vector< std::pair<int, int> > _skipZones;
|
std::vector< std::pair<int, int> > _skipZones;
|
||||||
std::vector<TreeParams> _treeParams;
|
std::vector<TreeParams> _treeParams;
|
||||||
HIMAGELIST _hTreeViewImaLst = nullptr;
|
|
||||||
|
|
||||||
generic_string parseSubLevel(size_t begin, size_t end, std::vector< generic_string > dataToSearch, intptr_t& foundPos);
|
generic_string parseSubLevel(size_t begin, size_t end, std::vector< generic_string > dataToSearch, intptr_t& foundPos);
|
||||||
size_t getBodyClosePos(size_t begin, const TCHAR *bodyOpenSymbol, const TCHAR *bodyCloseSymbol);
|
size_t getBodyClosePos(size_t begin, const TCHAR *bodyOpenSymbol, const TCHAR *bodyCloseSymbol);
|
||||||
|
|
|
@ -592,7 +592,7 @@ void ProjectPanel::notified(LPNMHDR notification)
|
||||||
::SendMessage(_hParent, WM_COMMAND, IDM_VIEW_PROJECT_PANEL_1 + _panelID, 0);
|
::SendMessage(_hParent, WM_COMMAND, IDM_VIEW_PROJECT_PANEL_1 + _panelID, 0);
|
||||||
SetWindowLongPtr (getHSelf(), DWLP_MSGRESULT, _isClosed ? 0 : 1);
|
SetWindowLongPtr (getHSelf(), DWLP_MSGRESULT, _isClosed ? 0 : 1);
|
||||||
}
|
}
|
||||||
else if ((notification->hwndFrom == _treeView.getHSelf()))
|
else if (notification->hwndFrom == _treeView.getHSelf())
|
||||||
{
|
{
|
||||||
TCHAR textBuffer[MAX_PATH] = { '\0' };
|
TCHAR textBuffer[MAX_PATH] = { '\0' };
|
||||||
TVITEM tvItem{};
|
TVITEM tvItem{};
|
||||||
|
|
|
@ -53,12 +53,12 @@ using namespace boost;
|
||||||
class BoostRegexSearch : public RegexSearchBase
|
class BoostRegexSearch : public RegexSearchBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
BoostRegexSearch() : _substituted(NULL) {}
|
BoostRegexSearch() {}
|
||||||
|
|
||||||
virtual ~BoostRegexSearch()
|
virtual ~BoostRegexSearch()
|
||||||
{
|
{
|
||||||
delete[] _substituted;
|
delete[] _substituted;
|
||||||
_substituted = NULL;
|
_substituted = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual Sci::Position FindText(Document* doc, Sci::Position minPos, Sci::Position maxPos, const char *regex,
|
virtual Sci::Position FindText(Document* doc, Sci::Position minPos, Sci::Position maxPos, const char *regex,
|
||||||
|
@ -243,10 +243,10 @@ private:
|
||||||
EncodingDependent<char, AnsiDocumentIterator> _ansi;
|
EncodingDependent<char, AnsiDocumentIterator> _ansi;
|
||||||
EncodingDependent<wchar_t, UTF8DocumentIterator> _utf8;
|
EncodingDependent<wchar_t, UTF8DocumentIterator> _utf8;
|
||||||
|
|
||||||
char *_substituted;
|
char *_substituted = nullptr;
|
||||||
|
|
||||||
Match _lastMatch;
|
Match _lastMatch;
|
||||||
int _lastDirection;
|
int _lastDirection = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace Scintilla::Internal
|
namespace Scintilla::Internal
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
using namespace Lexilla;
|
using namespace Lexilla;
|
||||||
|
|
||||||
constexpr auto KEYWORD_BOXHEADER = 1;
|
constexpr auto KEYWORD_BOXHEADER = 1;
|
||||||
constexpr auto KEYWORD_FOLDCONTRACTED = 2;
|
|
||||||
|
|
||||||
static bool IsOKBeforeRE(const int ch) {
|
static bool IsOKBeforeRE(const int ch) {
|
||||||
return (ch == '(') || (ch == '=') || (ch == ',');
|
return (ch == '(') || (ch == '=') || (ch == ',');
|
||||||
|
@ -59,18 +58,6 @@ static inline bool IsADoxygenChar(const int ch) {
|
||||||
ch == '}' || ch == '[' || ch == ']');
|
ch == '}' || ch == '[' || ch == ']');
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool IsStateComment(const int state) {
|
|
||||||
return ((state == SCE_C_COMMENT) ||
|
|
||||||
(state == SCE_C_COMMENTLINE) ||
|
|
||||||
(state == SCE_C_COMMENTDOC) ||
|
|
||||||
(state == SCE_C_COMMENTDOCKEYWORD) ||
|
|
||||||
(state == SCE_C_COMMENTDOCKEYWORDERROR));
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline bool IsStateString(const int state) {
|
|
||||||
return ((state == SCE_C_STRING) || (state == SCE_C_VERBATIM));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void ColouriseObjCDoc(size_t startPos, int length, int initStyle, WordList *keywordlists[],
|
static void ColouriseObjCDoc(size_t startPos, int length, int initStyle, WordList *keywordlists[],
|
||||||
Accessor &styler, bool caseSensitive) {
|
Accessor &styler, bool caseSensitive) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue