mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-26 07:39:45 -06:00
Use emplace_* functions where in-place construction is preferable
This commit is contained in:
@ -128,9 +128,7 @@ void FramebufferManagerBase::CopyToVirtualXFB(u32 xfbAddr, u32 fbWidth, u32 fbHe
|
||||
if (m_virtualXFBList.size() < MAX_VIRTUAL_XFB)
|
||||
{
|
||||
// create a new Virtual XFB and place it at the front of the list
|
||||
VirtualXFB v;
|
||||
memset(&v, 0, sizeof v);
|
||||
m_virtualXFBList.push_front(v);
|
||||
m_virtualXFBList.emplace_front();
|
||||
vxfb = m_virtualXFBList.begin();
|
||||
}
|
||||
else
|
||||
|
@ -57,14 +57,16 @@ public:
|
||||
protected:
|
||||
struct VirtualXFB
|
||||
{
|
||||
VirtualXFB() : xfbSource(nullptr) {}
|
||||
VirtualXFB()
|
||||
{
|
||||
}
|
||||
|
||||
// Address and size in GameCube RAM
|
||||
u32 xfbAddr;
|
||||
u32 xfbWidth;
|
||||
u32 xfbHeight;
|
||||
u32 xfbAddr = 0;
|
||||
u32 xfbWidth = 0;
|
||||
u32 xfbHeight = 0;
|
||||
|
||||
XFBSourceBase *xfbSource;
|
||||
XFBSourceBase* xfbSource = nullptr;
|
||||
};
|
||||
|
||||
typedef std::list<VirtualXFB> VirtualXFBListType;
|
||||
|
@ -129,7 +129,7 @@ void PostProcessingShaderConfiguration::LoadOptions(const std::string& code)
|
||||
IniFile::ParseLine(line, &key, &value);
|
||||
|
||||
if (!(key == "" && value == ""))
|
||||
current_strings->m_options.push_back(std::make_pair(key, value));
|
||||
current_strings->m_options.emplace_back(key, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user