From aac2be8ef9583ddccbb18ed281d7cf525ddb7b09 Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 4 Jun 2015 17:47:44 +1000 Subject: Move FindText flag decoding from caller to function to minimize code and chance of mistakes. --- src/Editor.cxx | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'src/Editor.cxx') diff --git a/src/Editor.cxx b/src/Editor.cxx index 77d9ce5e7..ce465808c 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -3643,10 +3643,6 @@ long Editor::FindText( static_cast(ft->chrg.cpMin), static_cast(ft->chrg.cpMax), ft->lpstrText, - (wParam & SCFIND_MATCHCASE) != 0, - (wParam & SCFIND_WHOLEWORD) != 0, - (wParam & SCFIND_WORDSTART) != 0, - (wParam & SCFIND_REGEXP) != 0, static_cast(wParam), &lengthFound); if (pos != -1) { @@ -3694,18 +3690,10 @@ long Editor::SearchText( try { if (iMessage == SCI_SEARCHNEXT) { pos = pdoc->FindText(searchAnchor, pdoc->Length(), txt, - (wParam & SCFIND_MATCHCASE) != 0, - (wParam & SCFIND_WHOLEWORD) != 0, - (wParam & SCFIND_WORDSTART) != 0, - (wParam & SCFIND_REGEXP) != 0, static_cast(wParam), &lengthFound); } else { pos = pdoc->FindText(searchAnchor, 0, txt, - (wParam & SCFIND_MATCHCASE) != 0, - (wParam & SCFIND_WHOLEWORD) != 0, - (wParam & SCFIND_WORDSTART) != 0, - (wParam & SCFIND_REGEXP) != 0, static_cast(wParam), &lengthFound); } @@ -3748,10 +3736,6 @@ long Editor::SearchInTarget(const char *text, int length) { pdoc->SetCaseFolder(CaseFolderForEncoding()); try { long pos = pdoc->FindText(targetStart, targetEnd, text, - (searchFlags & SCFIND_MATCHCASE) != 0, - (searchFlags & SCFIND_WHOLEWORD) != 0, - (searchFlags & SCFIND_WORDSTART) != 0, - (searchFlags & SCFIND_REGEXP) != 0, searchFlags, &lengthFound); if (pos != -1) { -- cgit v1.2.3