dont need those names for 30 line program
This commit is contained in:
parent
6b2dcaa957
commit
3cb65dba63
@ -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;
|
||||||
}
|
}
|
@ -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 (...) {}
|
||||||
}
|
}
|
||||||
|
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user