diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2020-02-18 17:32:11 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-18 17:32:11 -0500 |
| commit | e749b2072601830c11495ce210907391dfe7bc6b (patch) | |
| tree | 45d3082c037c99d60ddbbe5be8ab2bc60e467e23 /src/shared/util.cpp | |
| parent | 8c2814c9dc0d92e1ab015cde33eee8dcf880e265 (diff) | |
| parent | a28bd45c0b4dfbedcb816fedf0783c5287be3b19 (diff) | |
Merge pull request #1003 from isanae/file-list-improvements
Refresh optimizations
Diffstat (limited to 'src/shared/util.cpp')
| -rw-r--r-- | src/shared/util.cpp | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/src/shared/util.cpp b/src/shared/util.cpp index aa4ad4b3..483b36a9 100644 --- a/src/shared/util.cpp +++ b/src/shared/util.cpp @@ -130,6 +130,13 @@ std::wstring ToLowerCopy(const std::wstring& text) return result;
}
+std::wstring ToLowerCopy(std::wstring_view text)
+{
+ std::wstring result(text.begin(), text.end());
+ ToLowerInPlace(result);
+ return result;
+}
+
bool CaseInsenstiveComparePred(wchar_t lhs, wchar_t rhs)
{
return std::tolower(lhs, loc) == std::tolower(rhs, loc);
@@ -375,26 +382,6 @@ void checkDuplicateShortcuts(const QMenu& m) } // namespace MOShared
-TimeThis::TimeThis(QString what)
- : m_what(std::move(what)), m_start(Clock::now())
-{
-}
-
-TimeThis::~TimeThis()
-{
- using namespace std::chrono;
-
- const auto end = Clock::now();
- const auto d = duration_cast<milliseconds>(end - m_start).count();
-
- if (m_what.isEmpty()) {
- log::debug("{} ms", d);
- } else {
- log::debug("{} {} ms", m_what, d);
- }
-}
-
-
static bool g_exiting = false;
static bool g_canClose = false;
|
