mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-10 21:44:28 +00:00
Common/Analytics: std::move std::string constructor parameter
Allows calling code to move into the constructor, avoiding the creation of another string copy.
This commit is contained in:
parent
f813c4951a
commit
58e2cd5486
@ -198,7 +198,7 @@ void StdoutAnalyticsBackend::Send(std::string report)
|
|||||||
HexDump(reinterpret_cast<const u8*>(report.data()), report.size()).c_str());
|
HexDump(reinterpret_cast<const u8*>(report.data()), report.size()).c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
HttpAnalyticsBackend::HttpAnalyticsBackend(const std::string& endpoint) : m_endpoint(endpoint)
|
HttpAnalyticsBackend::HttpAnalyticsBackend(std::string endpoint) : m_endpoint(std::move(endpoint))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ public:
|
|||||||
class HttpAnalyticsBackend : public AnalyticsReportingBackend
|
class HttpAnalyticsBackend : public AnalyticsReportingBackend
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
HttpAnalyticsBackend(const std::string& endpoint);
|
explicit HttpAnalyticsBackend(std::string endpoint);
|
||||||
~HttpAnalyticsBackend() override;
|
~HttpAnalyticsBackend() override;
|
||||||
|
|
||||||
void Send(std::string report) override;
|
void Send(std::string report) override;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user