diff options
| author | Lioncash <mathew1800@gmail.com> | 2017-03-26 22:52:10 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2017-03-26 23:50:09 -0400 |
| commit | 9ebd84e54afecee306b4bbc97fa15604def37310 (patch) | |
| tree | 753d8ff6528628e92671e8348c8df68e3eca83b7 /Source/Core/VideoCommon/VertexLoaderManager.cpp | |
| parent | 9859533ab461c6d509337d8b9013a7ba62dd78ae (diff) | |
VertexLoaderManager: Return debug strings by value
This also renames AppendListToString to VertexLoadersToString.
Diffstat (limited to 'Source/Core/VideoCommon/VertexLoaderManager.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/VertexLoaderManager.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Source/Core/VideoCommon/VertexLoaderManager.cpp b/Source/Core/VideoCommon/VertexLoaderManager.cpp index f0d8decb3d..463094e66b 100644 --- a/Source/Core/VideoCommon/VertexLoaderManager.cpp +++ b/Source/Core/VideoCommon/VertexLoaderManager.cpp @@ -98,7 +98,7 @@ struct entry }; } -void AppendListToString(std::string* dest) +std::string VertexLoadersToString() { std::lock_guard<std::mutex> lk(s_vertex_loader_map_lock); std::vector<entry> entries; @@ -112,13 +112,18 @@ void AppendListToString(std::string* dest) total_size += e.text.size() + 1; entries.push_back(std::move(e)); } + sort(entries.begin(), entries.end()); - dest->reserve(dest->size() + total_size); + + std::string dest; + dest.reserve(total_size); for (const entry& entry : entries) { - *dest += entry.text; - *dest += '\n'; + dest += entry.text; + dest += '\n'; } + + return dest; } void MarkAllDirty() |
