dont need those names for 30 line program

This commit is contained in:
Akash Mozumdar 2018-11-04 16:31:39 -05:00
parent 6b2dcaa957
commit 3cb65dba63
3 changed files with 3 additions and 3 deletions

View File

@ -25,7 +25,7 @@ BOOL WINAPI DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved
bool ProcessSentence(std::wstring& sentence, SentenceInfo sentenceInfo) bool ProcessSentence(std::wstring& sentence, SentenceInfo sentenceInfo)
{ {
if (w == nullptr) return false; if (w == nullptr) return false;
std::lock_guard l(w->locker); std::lock_guard l(w->m);
sentence = std::regex_replace(sentence, w->regex, L""); sentence = std::regex_replace(sentence, w->regex, L"");
return true; return true;
} }

View File

@ -15,7 +15,7 @@ Window::~Window()
void Window::on_regexInput_textEdited(const QString& newRegex) void Window::on_regexInput_textEdited(const QString& newRegex)
{ {
std::lock_guard<std::mutex> lock(locker); std::lock_guard<std::mutex> l(m);
try { regex = newRegex.toStdWString(); } try { regex = newRegex.toStdWString(); }
catch (...) {} catch (...) {}
} }

View File

@ -20,7 +20,7 @@ public:
~Window(); ~Window();
Ui::Window* ui; Ui::Window* ui;
std::mutex locker; std::mutex m;
std::wregex regex; std::wregex regex;
private slots: private slots: