@@ -96,7 +96,7 @@ bool AutoComplete::HasDemofile(const wxString &commandname)
96
96
const std::lock_guard<std::mutex> lock (m_keywordsLock);
97
97
return std::any_of (m_wordList.at (demofile).begin (),
98
98
m_wordList.at (demofile).end (),
99
- [commandname](wxString file){return file == " \" " + commandname + " \" " ;});
99
+ [commandname](const wxString & file){return file == " \" " + commandname + " \" " ;});
100
100
}
101
101
102
102
@@ -389,7 +389,7 @@ void AutoComplete::LoadableFiles_BackgroundTask(wxString sharedir) {
389
389
QueueEvent (event);
390
390
}
391
391
392
- void AutoComplete::UpdateDemoFiles (wxString partial, wxString maximaDir) {
392
+ void AutoComplete::UpdateDemoFiles (wxString partial, const wxString & maximaDir) {
393
393
// Remove the opening quote from the partial.
394
394
if (partial.at (0 ) == wxS (' \" ' ))
395
395
partial = partial.Right (partial.Length () - 1 );
@@ -425,7 +425,7 @@ void AutoComplete::UpdateDemoFiles(wxString partial, wxString maximaDir) {
425
425
}
426
426
}
427
427
428
- void AutoComplete::UpdateGeneralFiles (wxString partial, wxString maximaDir) {
428
+ void AutoComplete::UpdateGeneralFiles (wxString partial, const wxString & maximaDir) {
429
429
// Remove the opening quote from the partial.
430
430
if (partial.at (0 ) == wxS (' \" ' ))
431
431
partial = partial.Right (partial.Length () - 1 );
@@ -458,7 +458,7 @@ void AutoComplete::UpdateGeneralFiles(wxString partial, wxString maximaDir) {
458
458
}
459
459
}
460
460
461
- void AutoComplete::UpdateLoadFiles (wxString partial, wxString maximaDir) {
461
+ void AutoComplete::UpdateLoadFiles (wxString partial, const wxString & maximaDir) {
462
462
wxLogMessage (_ (" Scheduling a background task that scans for autocompletable "
463
463
" file names." ));
464
464
// Remove the opening quote from the partial.
@@ -515,7 +515,6 @@ std::vector<wxString> AutoComplete::CompleteSymbol(wxString partial,
515
515
if ((type != tmplte) && (type >=0 ) && (type < numberOfTypes )) {
516
516
const std::lock_guard<std::mutex> lock (m_keywordsLock);
517
517
for (const auto &i : m_wordList.at (type)) {
518
- // cppcheck-suppress useStlAlgorithm
519
518
if (i.StartsWith (partial) &&
520
519
(std::find (completions.begin (), completions.end (), i) == completions.end ()))
521
520
completions.push_back (i);
0 commit comments