mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-05-08 03:28:31 +03:00
Merge pull request #8233 from JosJuice/stringutil-string-view
StringUtil: Use std::string_view more
This commit is contained in:
commit
48ca2c6f2e
13 changed files with 104 additions and 95 deletions
|
@ -7,6 +7,8 @@
|
|||
#include <cstddef>
|
||||
#include <fstream>
|
||||
#include <functional>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
|
||||
|
@ -39,7 +41,7 @@ static Map LoadMap(const std::string& file_path)
|
|||
const size_t equals_index = line.find('=');
|
||||
if (equals_index != std::string::npos)
|
||||
{
|
||||
const std::string game_id = StripSpaces(line.substr(0, equals_index));
|
||||
const std::string_view game_id = StripSpaces(line.substr(0, equals_index));
|
||||
if (game_id.length() >= 4)
|
||||
map.emplace(game_id, StripSpaces(line.substr(equals_index + 1)));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue