Commit c4356969 authored by edo9300's avatar edo9300 Committed by nanahira

Fixed function definition (#10)

* Update game.cpp

* Update game.h
parent 5ff31121
......@@ -1398,21 +1398,7 @@ void Game::FlashWindow() {
FlashWindowEx(&fi);
#endif
}
bool Game::CheckRegEx(const wchar_t* text, const wchar_t* exp, bool exact) {
if(!gameConf.search_regex)
return false;
bool result;
try {
if(exact)
result = std::regex_match(text, std::wregex(exp));
else
result = std::regex_search(text, std::wregex(exp));
} catch(...) {
result = false;
}
return result;
}
bool Game::CheckRegEx(std::wstring text, const wchar_t* exp, bool exact) {
bool Game::CheckRegEx(const std::wstring& text, const std::wstring& exp, bool exact) {
if(!gameConf.search_regex)
return false;
bool result;
......
......@@ -144,8 +144,7 @@ public:
int LocalPlayer(int player);
const wchar_t* LocalName(int local_player);
bool CheckRegEx(const wchar_t* text, const wchar_t* exp, bool exact = false);
bool CheckRegEx(std::wstring text, const wchar_t* exp, bool exact = false);
bool CheckRegEx(const std::wstring& text, const std::wstring& exp, bool exact);
bool HasFocus(EGUI_ELEMENT_TYPE type) const {
irr::gui::IGUIElement* focus = env->getFocus();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment