summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Lioncash2018-07-19 11:46:59 -0400
committerGravatar Lioncash2018-07-19 11:50:12 -0400
commitf3daecafeb532e830dc7f0643bf8ad84473b3f8b (patch)
treeb7366f133734b5bbee70732e8c9ca30ae2cd606f /src
parentMerge pull request #699 from lioncash/vfs (diff)
downloadyuzu-f3daecafeb532e830dc7f0643bf8ad84473b3f8b.tar.gz
yuzu-f3daecafeb532e830dc7f0643bf8ad84473b3f8b.tar.xz
yuzu-f3daecafeb532e830dc7f0643bf8ad84473b3f8b.zip
nvflinger: Emplace Display instances directly
We can use emplace_back to construct the Display instances directly, instead of constructing them separately and copying them, avoiding the need to copy std::string and std::vector instances that are part of the Display struct.
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/nvflinger/nvflinger.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/core/hle/service/nvflinger/nvflinger.cpp b/src/core/hle/service/nvflinger/nvflinger.cpp
index d580f779e..1fca1743d 100644
--- a/src/core/hle/service/nvflinger/nvflinger.cpp
+++ b/src/core/hle/service/nvflinger/nvflinger.cpp
@@ -23,15 +23,10 @@ constexpr u64 frame_ticks = static_cast<u64>(CoreTiming::BASE_CLOCK_RATE / SCREE
23 23
24NVFlinger::NVFlinger() { 24NVFlinger::NVFlinger() {
25 // Add the different displays to the list of displays. 25 // Add the different displays to the list of displays.
26 Display default_{0, "Default"}; 26 displays.emplace_back(0, "Default");
27 Display external{1, "External"}; 27 displays.emplace_back(1, "External");
28 Display edid{2, "Edid"}; 28 displays.emplace_back(2, "Edid");
29 Display internal{3, "Internal"}; 29 displays.emplace_back(3, "Internal");
30
31 displays.emplace_back(default_);
32 displays.emplace_back(external);
33 displays.emplace_back(edid);
34 displays.emplace_back(internal);
35 30
36 // Schedule the screen composition events 31 // Schedule the screen composition events
37 composition_event = 32 composition_event =