summaryrefslogtreecommitdiff
path: root/src/common/logging/backend.h
diff options
context:
space:
mode:
authorGravatar Lioncash2018-07-20 15:27:17 -0400
committerGravatar Lioncash2018-07-20 15:27:20 -0400
commit457d1b4490dbc293246f372532a81a9e90d366c4 (patch)
tree93eb2026cadad03ab9d52be843a9446ff180ecf0 /src/common/logging/backend.h
parentMerge pull request #740 from Subv/acc_crash (diff)
downloadyuzu-457d1b4490dbc293246f372532a81a9e90d366c4.tar.gz
yuzu-457d1b4490dbc293246f372532a81a9e90d366c4.tar.xz
yuzu-457d1b4490dbc293246f372532a81a9e90d366c4.zip
logging/backend: Use std::string_view in RemoveBackend() and GetBackend()
These can just use a view to a string since its only comparing against two names in both cases for matches. This avoids constructing std::string instances where they aren't necessary.
Diffstat (limited to 'src/common/logging/backend.h')
-rw-r--r--src/common/logging/backend.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/common/logging/backend.h b/src/common/logging/backend.h
index 57cdf6b2d..45609a535 100644
--- a/src/common/logging/backend.h
+++ b/src/common/logging/backend.h
@@ -7,6 +7,7 @@
7#include <cstdarg> 7#include <cstdarg>
8#include <memory> 8#include <memory>
9#include <string> 9#include <string>
10#include <string_view>
10#include <utility> 11#include <utility>
11#include "common/file_util.h" 12#include "common/file_util.h"
12#include "common/logging/filter.h" 13#include "common/logging/filter.h"
@@ -106,9 +107,9 @@ private:
106 107
107void AddBackend(std::unique_ptr<Backend> backend); 108void AddBackend(std::unique_ptr<Backend> backend);
108 109
109void RemoveBackend(const std::string& backend_name); 110void RemoveBackend(std::string_view backend_name);
110 111
111Backend* GetBackend(const std::string& backend_name); 112Backend* GetBackend(std::string_view backend_name);
112 113
113/** 114/**
114 * Returns the name of the passed log class as a C-string. Subclasses are separated by periods 115 * Returns the name of the passed log class as a C-string. Subclasses are separated by periods