Mercurial > minori
diff dep/animia/src/strategist.cc @ 156:cdf79282d647
dep/animia: add VERY early x11 window stuff
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Wed, 15 Nov 2023 18:04:04 -0500 |
parents | bd439dd6ffc5 |
children | bc1ae1810855 |
line wrap: on
line diff
--- a/dep/animia/src/strategist.cc Wed Nov 15 15:24:39 2023 -0500 +++ b/dep/animia/src/strategist.cc Wed Nov 15 18:04:04 2023 -0500 @@ -1,11 +1,9 @@ +#include <regex> + +#include "animia.h" +#include "animia/fd.h" #include "animia/strategies.h" #include "animia/util.h" -#include "animia/fd.h" -#include "animia.h" - -#include <iostream> - -#include <regex> namespace animia::internal { @@ -28,12 +26,8 @@ bool success = false; switch (result_.type) { - case ResultType::Process: - success |= ApplyOpenFilesStrategy(); - break; - case ResultType::Window: - success |= ApplyWindowTitleStrategy(); - break; + case ResultType::Process: success |= ApplyOpenFilesStrategy(); break; + case ResultType::Window: success |= ApplyWindowTitleStrategy(); break; } return success; @@ -80,8 +74,7 @@ static MediaInfoType InferMediaInformationType(const std::string& str) { const std::regex path_pattern(R"(^(?:[A-Za-z]:[/\\]|\\\\)[^<>:"/\\|?*]+)"); - return (std::regex_search(str, path_pattern)) - ? MediaInfoType::File : MediaInfoType::Unknown; + return (std::regex_search(str, path_pattern)) ? MediaInfoType::File : MediaInfoType::Unknown; } bool Strategist::ApplyWindowTitleStrategy() { @@ -119,4 +112,4 @@ return true; } -} +} // namespace animia::internal