mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-20 08:37:53 -05:00
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.
This commit is contained in:
@ -7,6 +7,7 @@
|
||||
#include <cstdarg>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <utility>
|
||||
#include "common/file_util.h"
|
||||
#include "common/logging/filter.h"
|
||||
@ -106,9 +107,9 @@ private:
|
||||
|
||||
void AddBackend(std::unique_ptr<Backend> backend);
|
||||
|
||||
void RemoveBackend(const std::string& backend_name);
|
||||
void RemoveBackend(std::string_view backend_name);
|
||||
|
||||
Backend* GetBackend(const std::string& backend_name);
|
||||
Backend* GetBackend(std::string_view backend_name);
|
||||
|
||||
/**
|
||||
* Returns the name of the passed log class as a C-string. Subclasses are separated by periods
|
||||
|
Reference in New Issue
Block a user